diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-03-20 02:34:01 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-03-20 02:34:01 +0000 |
commit | 7566fd148b1906a672217b78d9ee7e015a74cda9 (patch) | |
tree | acb2cb0fe23995d7843239463500f653b49d1ebf /sbin/growfs | |
parent | 290c91ea66f03f6990d6543be3fbbfc8ac015f28 (diff) | |
download | FreeBSD-src-7566fd148b1906a672217b78d9ee7e015a74cda9.zip FreeBSD-src-7566fd148b1906a672217b78d9ee7e015a74cda9.tar.gz |
Teach growfs's dbg_open() that a filename of "-" for output means to
open "/dev/stdout". This doesn't actually affect growfs, but does affect
ffsinfo, permitting ffsinfo to output to the shell's stdout rather than
requiring it be dumped to a file or explicitly pointed at a special
device.
Reviewed by: peter
Diffstat (limited to 'sbin/growfs')
-rw-r--r-- | sbin/growfs/debug.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index c86ca54..d178a26 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -71,7 +71,10 @@ void dbg_open(const char *fn) { - dbg_log=fopen(fn, "a"); + if (strcmp(fn, "-") == 0) + dbg_log=fopen("/dev/stdout", "a"); + else + dbg_log=fopen(fn, "a"); return; } |