summaryrefslogtreecommitdiff
path: root/usr.bin/sup
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-04-27 18:13:17 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-04-27 18:13:17 +0000
commit629ee9d8d31db6a7c5ff8bfa5424df3e445b8232 (patch)
tree29911d29a2752e6dff58f5353445bf566c7b319c /usr.bin/sup
parent9da0bc8c575b77716e1a27d2d8c01edb7214f2b3 (diff)
make -v print only actual changes and add -V for old behaviour; beck@ ok
Diffstat (limited to 'usr.bin/sup')
-rw-r--r--usr.bin/sup/src/sup.19
-rw-r--r--usr.bin/sup/src/supcdefs.h6
-rw-r--r--usr.bin/sup/src/supcmain.c5
-rw-r--r--usr.bin/sup/src/supcmeat.c7
4 files changed, 20 insertions, 7 deletions
diff --git a/usr.bin/sup/src/sup.1 b/usr.bin/sup/src/sup.1
index 2565ded0304..20eeaebca13 100644
--- a/usr.bin/sup/src/sup.1
+++ b/usr.bin/sup/src/sup.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sup.1,v 1.14 2004/08/25 22:34:27 jmc Exp $
+.\" $OpenBSD: sup.1,v 1.15 2005/04/27 18:13:16 mickey Exp $
.\"
.\" Copyright (c) 1992 Carnegie Mellon University
.\" All Rights Reserved.
@@ -334,7 +334,7 @@ flag and the
.B compress
supfile option.
.TP
-.B -v
+.B -V
Normally,
.I sup
will only print messages if there
@@ -344,6 +344,11 @@ to also print
messages during normal progress showing what
.I sup
is doing.
+.TP
+.B -v
+With this option
+.I sup
+only shows the updated files and created directories.
.i0
.DT
.PP
diff --git a/usr.bin/sup/src/supcdefs.h b/usr.bin/sup/src/supcdefs.h
index 4bf7cf8548b..4dd4ef97d19 100644
--- a/usr.bin/sup/src/supcdefs.h
+++ b/usr.bin/sup/src/supcdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: supcdefs.h,v 1.7 2001/05/05 15:32:11 millert Exp $ */
+/* $OpenBSD: supcdefs.h,v 1.8 2005/04/27 18:13:16 mickey Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -116,9 +116,11 @@ typedef struct collstruct COLLECTION;
#define CFURELSUF 02000
#define CFCOMPRESS 04000
#define CFSILENT 10000
+#define CFVERBOSE2 20000
/*************************
*** M A C R O S ***
*************************/
-#define vnotify if (thisC->Cflags&CFVERBOSE) notify
+#define vnotify if (thisC->Cflags & CFVERBOSE) notify
+#define v2notify if (thisC->Cflags & (CFVERBOSE|CFVERBOSE2) == (CFVERBOSE|CFVERBOSE2)) notify
diff --git a/usr.bin/sup/src/supcmain.c b/usr.bin/sup/src/supcmain.c
index b9b16f127d2..f25e0618f5e 100644
--- a/usr.bin/sup/src/supcmain.c
+++ b/usr.bin/sup/src/supcmain.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supcmain.c,v 1.19 2004/05/31 15:48:26 pedro Exp $ */
+/* $OpenBSD: supcmain.c,v 1.20 2005/04/27 18:13:16 mickey Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -573,6 +573,9 @@ doswitch(argp, collTp, oflagsp, aflagsp)
case 'v':
oflags |= CFVERBOSE;
break;
+ case 'V':
+ oflags |= CFVERBOSE|CFVERBOSE2;
+ break;
case 'z':
oflags |= CFCOMPRESS;
break;
diff --git a/usr.bin/sup/src/supcmeat.c b/usr.bin/sup/src/supcmeat.c
index a792a6d1478..ee5b191d72b 100644
--- a/usr.bin/sup/src/supcmeat.c
+++ b/usr.bin/sup/src/supcmeat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supcmeat.c,v 1.20 2005/03/26 21:37:56 mickey Exp $ */
+/* $OpenBSD: supcmeat.c,v 1.21 2005/04/27 18:13:16 mickey Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -923,7 +923,10 @@ recvdir(t, new, statp) /* receive directory from network */
tbuf[1].tv_usec = 0;
if (!noutime)
(void) utimes(t->Tname, tbuf);
- vnotify("SUP %s directory %s\n", new ? "Created" : "Updated", t->Tname);
+ if (new)
+ vnotify("SUP Created directory %s\n", t->Tname);
+ else
+ v2notify("SUP Updated directory %s\n", t->Tname);
return (FALSE);
}