diff options
author | sos <sos@FreeBSD.org> | 1996-12-01 11:25:38 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1996-12-01 11:25:38 +0000 |
commit | 304d831859d554948e48205432147cf4e04acca8 (patch) | |
tree | 3caeb1000fbf433bbefbf62abe3def80c205c219 /sbin/newfs/mkfs.c | |
parent | 33c2e639e1d61f008dac52121511b79f1fb488e6 (diff) | |
download | FreeBSD-src-304d831859d554948e48205432147cf4e04acca8.zip FreeBSD-src-304d831859d554948e48205432147cf4e04acca8.tar.gz |
This update adds the support for != 512 byte sector SCSI devices to
the sd & od drivers. There is also slight changes to fdisk & newfs
in order to comply with different sectorsizes.
Currently sectors of size 512, 1024 & 2048 are supported, the only
restriction beeing in fdisk, which hunts for the sectorsize of
the device.
This is based on patches to od.c and the other system files by
John Gumb & Barry Scott, minor changes and the sd.c patches by
me.
There also exist some patches for the msdos filesys code, but I
havn't been able to test those (yet).
John Gumb (john@talisker.demon.co.uk)
Barry Scott (barry@scottb.demon.co.uk)
Diffstat (limited to 'sbin/newfs/mkfs.c')
-rw-r--r-- | sbin/newfs/mkfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index d67090b..20d6832 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -82,6 +82,7 @@ extern int nsectors; /* # sectors/track */ extern int nphyssectors; /* # sectors/track including spares */ extern int secpercyl; /* sectors per cylinder */ extern int sectorsize; /* bytes/sector */ +extern int realsectorsize; /* bytes/sector in hardware*/ extern int rpm; /* revolutions/minute of drive */ extern int interleave; /* hardware sector interleave */ extern int trackskew; /* sector 0 skew, per track */ @@ -209,7 +210,8 @@ mkfs(pp, fsys, fi, fo) */ if (fssize <= 0) printf("preposterous size %d\n", fssize), exit(13); - wtfs(fssize - 1, sectorsize, (char *)&sblock); + wtfs(fssize - (realsectorsize / DEV_BSIZE), realsectorsize, + (char *)&sblock); /* * collect and verify the sector and track info */ |