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
This commit is contained in:
Robert Watson 2002-03-20 02:34:01 +00:00
parent df66668c42
commit b819704f1b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92743

View File

@ -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;
}