summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/newfs.c
diff options
context:
space:
mode:
authorwes <wes@FreeBSD.org>2003-11-16 07:17:30 +0000
committerwes <wes@FreeBSD.org>2003-11-16 07:17:30 +0000
commita79f1dd547b90d142814637f968b1b79ba96aab6 (patch)
tree268aee28f92ddb4ffb10809f224a66f994fcf5f1 /sbin/newfs/newfs.c
parent6288a669519a7fbdfd0465318c62c56d1b223e17 (diff)
downloadFreeBSD-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.c6
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;
OpenPOWER on IntegriCloud