Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2002 12:08:44 -0800 (PST)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/i386/i386 autoconf.c machdep.c src/sbin/sysctl sysctl.c
Message-ID:  <200203102008.g2AK8ic50180@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
luigi       2002/03/10 12:08:44 PST

  Modified files:
    sys/i386/i386        autoconf.c machdep.c 
    sbin/sysctl          sysctl.c 
  Log:
  Export a (machine dependent) kernel variable bootdev as
  machdep.guessed_bootdev, and add code to sysctl to parse its value
  and give a (not necessarily correct) name to the device we booted
  from (the main motivation for this code is to use the info in the
  PicoBSD boot scripts, and the impact on the kernel is minimal).
  
  NOTE: the information available in bootdev is not always reliable,
  so you should not trust it too much.  The parsing code is the same
  as in boot2.c, and cannot cover all cases -- as it is, it seems to
  work fine with floppies and IDE disks recognised by the BIOS. It
  _should_ work as well with SCSI disks recognised by the BIOS.
  Booting from a CDROM in floppy emulation will return /dev/fd0 (because
  this is what the BIOS tells us).
  Booting off the network (e.g. with etherboot) leaves bootdev unset so
  the value will be printed as "invalid (0xffffffff)".
  
  Finally, this feature might go away at some point, hopefully when we
  have a more reliable way to get the same information.
  
  MFC-after: 5 days
  
  Revision  Changes    Path
  1.42      +51 -0     src/sbin/sysctl/sysctl.c
  1.162     +0 -2      src/sys/i386/i386/autoconf.c
  1.502     +4 -0      src/sys/i386/i386/machdep.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203102008.g2AK8ic50180>