diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1994-09-18 21:17:40 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1994-09-18 21:17:40 +0000 |
commit | b98c90be2e4e7635f6a431fe21bd5927a850b840 (patch) | |
tree | cec1784f94e1baa76dfd3637e01e44d44396d0a6 /usr.sbin/mtree/misc.c | |
parent | 10e98516daf367390bc752990d2da01ac56b167a (diff) | |
download | FreeBSD-src-b98c90be2e4e7635f6a431fe21bd5927a850b840.zip FreeBSD-src-b98c90be2e4e7635f6a431fe21bd5927a850b840.tar.gz |
1. Remove commented out CFLAGS+=-DDEBUG from Makefile
2. Clean up code so it compiles -Wall (except for sccsid's and copyright).
This included fixing several printf formats that where not correct,
and changing the data types of a few things.
3. Implement new option -i that produces indented mtree output files.
4. Implement new option -n that turns off directory comments.
5. Only emit /set records if something has changed since the last one.
Diffstat (limited to 'usr.sbin/mtree/misc.c')
-rw-r--r-- | usr.sbin/mtree/misc.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c index 3169136..ff97084 100644 --- a/usr.sbin/mtree/misc.c +++ b/usr.sbin/mtree/misc.c @@ -52,18 +52,18 @@ typedef struct _key { /* NB: the following table must be sorted lexically. */ static KEY keylist[] = { - "cksum", F_CKSUM, NEEDVALUE, - "gid", F_GID, NEEDVALUE, - "gname", F_GNAME, NEEDVALUE, - "ignore", F_IGN, 0, - "link", F_SLINK, NEEDVALUE, - "mode", F_MODE, NEEDVALUE, - "nlink", F_NLINK, NEEDVALUE, - "size", F_SIZE, NEEDVALUE, - "time", F_TIME, NEEDVALUE, - "type", F_TYPE, NEEDVALUE, - "uid", F_UID, NEEDVALUE, - "uname", F_UNAME, NEEDVALUE, + {"cksum", F_CKSUM, NEEDVALUE}, + {"gid", F_GID, NEEDVALUE}, + {"gname", F_GNAME, NEEDVALUE}, + {"ignore", F_IGN, 0}, + {"link", F_SLINK, NEEDVALUE}, + {"mode", F_MODE, NEEDVALUE}, + {"nlink", F_NLINK, NEEDVALUE}, + {"size", F_SIZE, NEEDVALUE}, + {"time", F_TIME, NEEDVALUE}, + {"type", F_TYPE, NEEDVALUE}, + {"uid", F_UID, NEEDVALUE}, + {"uname", F_UNAME, NEEDVALUE}, }; u_int @@ -113,7 +113,8 @@ err(fmt, va_alist) #else va_start(ap); #endif - (void)fprintf(stderr, "mtree: "); + (void)fflush(NULL); + (void)fprintf(stderr, "\nmtree: "); (void)vfprintf(stderr, fmt, ap); va_end(ap); (void)fprintf(stderr, "\n"); |