summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/newfs.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-04-24 11:44:02 +0000
committerphk <phk@FreeBSD.org>2002-04-24 11:44:02 +0000
commit0f040bcefc6089fa617085e2f285bd8a94b2ce81 (patch)
tree2587dfad5420ee43da47ccb65c3280a1bb0e6035 /sbin/newfs/newfs.h
parentf92f3e5ed1e887f7f2afc3733747f62b2b781b2e (diff)
downloadFreeBSD-src-0f040bcefc6089fa617085e2f285bd8a94b2ce81.zip
FreeBSD-src-0f040bcefc6089fa617085e2f285bd8a94b2ce81.tar.gz
Continue the cleanup preparations for UFS2 (& GEOM):
Use only one filedescriptor. Open in R/O or R/W based in the '-N' option. Make the filedescriptor a global variable instead of passing it around as semi-global variable(s). Remove the undocumented ability to specify type without '-T' option. Replace fatal() with straight err(3)/errx(3). Save calls to strerror() where applicable. Loose the progname variable. Get the sense of the cpgflag test correct so we only issue warnings if people specify cpg and can't get that. It can be argued that this should be an error. Remove the check to see if the disk is mounted: Open for writing would fail if it were mounted. Attempt to get the sectorsize and mediasize with the generic disk ioctls, fall back to disklabel and /etc/disktab as we can. Notice that on-disk labels still take precedence over /etc/disktab, this is probably wrong, but not as wrong as the entire concept of /etc/disktab is. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sbin/newfs/newfs.h')
-rw-r--r--sbin/newfs/newfs.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/newfs/newfs.h b/sbin/newfs/newfs.h
index ae92c0d..a66a29d 100644
--- a/sbin/newfs/newfs.h
+++ b/sbin/newfs/newfs.h
@@ -42,7 +42,7 @@ extern int Rflag; /* regression test */
extern int Uflag; /* enable soft updates for file system */
extern u_int fssize; /* file system size */
extern u_int secpercyl; /* sectors per cylinder */
-extern int sectorsize; /* bytes/sector */
+extern u_int sectorsize; /* bytes/sector */
extern int realsectorsize; /* bytes/sector in hardware*/
extern int fsize; /* fragment size */
extern int bsize; /* block size */
@@ -55,4 +55,6 @@ extern int maxcontig; /* max contiguous blocks to allocate */
extern int maxbpg; /* maximum blocks per file in a cyl group */
extern int avgfilesize; /* expected average file size */
extern int avgfilesperdir; /* expected number of files per directory */
-void mkfs (struct partition *, char *, int, int);
+extern int fso; /* filedescriptor to device */
+
+void mkfs (struct partition *, char *);
OpenPOWER on IntegriCloud