[PATCH 1/3] rename: make --no-act to imply --verbose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is reasonable to assume use of --no-act means one wants to always see
what would have happen if rename is done.  To say same slightly differently,
if there is sn use case for silent rename --no-act run I cannot think one.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 misc-utils/rename.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc-utils/rename.c b/misc-utils/rename.c
index c1b9d4a0e..502e888d7 100644
--- a/misc-utils/rename.c
+++ b/misc-utils/rename.c
@@ -154,11 +154,11 @@ int main(int argc, char **argv)
 
 	while ((c = getopt_long(argc, argv, "vsVhn", longopts, NULL)) != -1)
 		switch (c) {
-		case 'v':
-			verbose = 1;
-			break;
 		case 'n':
 			noact = 1;
+			/* fallthrough */
+		case 'v':
+			verbose = 1;
 			break;
 		case 's':
 			do_rename = do_symlink;
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux