changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.
The system boots and can mount UFS filesystems.
Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
Mount_std mounts will not work until the getfsent
library routine is changed.
Reviewed by: various people
Submitted by: Jeffery Hsu <hsu@freebsd.org>
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
with an inconsistent state. I think the return actually "can't happen".
Cleaned up style of recent changes.
I only fiddled with this because of bugs in recent changes.
note that at_shutdown has a new parameter to indicate When
during a shutdown the callout should be made. also
add a RB_POWEROFF flag to reboot "howto" parameter..
tells the reboot code in our at_shutdown module to turn off the UPS
and kill the power. bound to be useful eventually on laptops
Saves about 280 butes of source per driver, 56 bytes in object size
and another 56 bytes moves from data to bss.
No functional change intended nor expected.
GENERIC should be about one k smaller now :-)
Added scsi control devices.
Converted almost everything that I changed to use devfs_add_devswf()
and verbose id macros.
st.c:
Renamed enrst* to erst* since that's what the current name is (enrst
seems to be an old name).
quite work yet, so the heart of it is disabled.
Added bdev and cdev args to dsopen().
drivers:
Fixed device names, links, minor numbers and modes.
wd.c:
Started actually supporting devfs.
diskslice.h:
Added devfs tokens to structs (currently 576 of them per disk! :-().
subr_diskslice.c:
Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times. DEVFS is #undefed at the start so
that this shouldn't cause problems.
the standard macro dbtob(). The non-B_PAGING case now works well enough
to run newfs on a 32GB virtual drive.
Fixed numerous bogus variable types and one overflowing multiplication
in the B_PAGING case of vnstrategy(). Swapping to virtual drives larger
than 2GB might work now.
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)
If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)
pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..
Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.
some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.
BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...
If you want to add a new device in conf.c
please make sure I know
so I can keep it up to date too..
as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
to <machine/conf.h>. conf.h was mechanically generated by
`grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The
prototypes should be moved back to the driver sources when the functions
are staticalized.
labels.
Please test the slice/label features:
cd /dev; sh MAKEDEV svn0
cd /var/tmp; dd if=/dev/zero of=vnfile bs=8192 count=1024
vnconfig -c /dev/rvn0 /var/tmp/vnfile
fdisk /dev/rvn0 # invent a geometry, create one BSD partition
disklabel -r -w vn0 floppy # a convenient (bogus) label
disklabel -e vn0 # edit label to match device
newfs /dev/rvn0a
mount /dev/vn0a /mnt
...
The steps after the fdisk could name the device vn0s1 instead of vn0.
is supposed to work except "media removal" (shutting down the vn driver)
while some partitions are open.
Fix some errnos: return ENOTTY, not ENXIO for unknown ioctls; return
ENODEV, not ENXIO for the unsupported dump operation.