diff options
| author | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
|---|---|---|
| committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
| commit | 23090366f729c56cab62de74c7a51792357e98a9 (patch) | |
| tree | c511c885796e28ec571b5267e8f11f3b103d35e9 /sbin/newfs | |
| parent | 7750ad47a9a7dbc83f87158464170c8640723293 (diff) | |
| parent | 22ff74b2f44234d31540b1f7fd6c91489c37cad3 (diff) | |
Notes
Diffstat (limited to 'sbin/newfs')
| -rw-r--r-- | sbin/newfs/mkfs.c | 4 | ||||
| -rw-r--r-- | sbin/newfs/newfs.c | 2 | ||||
| -rw-r--r-- | sbin/newfs/newfs.h | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 5e2a579559078..0a547f90e3bc0 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -263,6 +263,7 @@ restart: } sblock.fs_fsbtodb = ilog2(sblock.fs_fsize / sectorsize); sblock.fs_size = fssize = dbtofsb(&sblock, fssize); + sblock.fs_providersize = dbtofsb(&sblock, mediasize / sectorsize); /* * Before the filesystem is finally initialized, mark it @@ -1003,7 +1004,8 @@ iput(union dinode *ip, ino_t ino) sblock.fs_cstotal.cs_nifree--; fscs[0].cs_nifree--; if (ino >= (unsigned long)sblock.fs_ipg * sblock.fs_ncg) { - printf("fsinit: inode value out of range (%d).\n", ino); + printf("fsinit: inode value out of range (%ju).\n", + (uintmax_t)ino); exit(32); } d = fsbtodb(&sblock, ino_to_fsba(&sblock, ino)); diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 61637749c2122..3ce0be75f687f 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -94,6 +94,7 @@ int lflag; /* enable multilabel for file system */ int nflag; /* do not create .snap directory */ int tflag; /* enable TRIM */ intmax_t fssize; /* file system size */ +off_t mediasize; /* device size */ int sectorsize; /* bytes/sector */ int realsectorsize; /* bytes/sector in hardware */ int fsize = 0; /* fragment size */ @@ -135,7 +136,6 @@ main(int argc, char *argv[]) char *cp, *special; intmax_t reserved; int ch, i, rval; - off_t mediasize; char part_name; /* partition name, default to full disk */ part_name = 'c'; diff --git a/sbin/newfs/newfs.h b/sbin/newfs/newfs.h index 25bfcc8f68fa7..9e1da0db8924b 100644 --- a/sbin/newfs/newfs.h +++ b/sbin/newfs/newfs.h @@ -88,6 +88,7 @@ extern int lflag; /* enable multilabel MAC for file system */ extern int nflag; /* do not create .snap directory */ extern int tflag; /* enable TRIM */ extern intmax_t fssize; /* file system size */ +extern off_t mediasize; /* device size */ extern int sectorsize; /* bytes/sector */ extern int realsectorsize; /* bytes/sector in hardware*/ extern int fsize; /* fragment size */ |
