diff options
author | wes <wes@FreeBSD.org> | 2003-11-16 07:17:30 +0000 |
---|---|---|
committer | wes <wes@FreeBSD.org> | 2003-11-16 07:17:30 +0000 |
commit | a79f1dd547b90d142814637f968b1b79ba96aab6 (patch) | |
tree | 268aee28f92ddb4ffb10809f224a66f994fcf5f1 /sbin/newfs/newfs.c | |
parent | 6288a669519a7fbdfd0465318c62c56d1b223e17 (diff) | |
download | FreeBSD-src-a79f1dd547b90d142814637f968b1b79ba96aab6.zip FreeBSD-src-a79f1dd547b90d142814637f968b1b79ba96aab6.tar.gz |
Add the -E command line option to force error conditions for testing.
Sponsord by: St. Bernard Software
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r-- | sbin/newfs/newfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 584ff0c..aff266e 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -119,6 +119,7 @@ int Nflag; /* run without writing file system */ int Oflag = 2; /* file system format (1 => UFS1, 2 => UFS2) */ int Rflag; /* regression test */ int Uflag; /* enable soft updates for file system */ +int Eflag = 0; /* exit in middle of newfs for testing */ quad_t fssize; /* file system size */ int sectorsize; /* bytes/sector */ int realsectorsize; /* bytes/sector in hardware */ @@ -156,8 +157,11 @@ main(int argc, char *argv[]) off_t mediasize; while ((ch = getopt(argc, argv, - "L:NO:RS:T:Ua:b:c:d:e:f:g:h:i:m:o:s:")) != -1) + "EL:NO:RS:T:Ua:b:c:d:e:f:g:h:i:m:o:s:")) != -1) switch (ch) { + case 'E': + Eflag++; + break; case 'L': volumelabel = optarg; i = -1; |