[PATCH] write "Command successful" to stdout

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

 



Hiyas,

attached is a patch that makes cryptsetup write "Command successful" to
stdout instead of stderr. Normally only error or debug messages go to
stderr imho, therefore it fits better to stdout.

Also I want to propose to add a "-q/--quiet" switch to cryptsetup that
surpresses all messages to stdout. I guess I can prepare a patch for this,
if there are no objections.

Regards,
Till
diff -up cryptsetup-1.0.6/src/cryptsetup.c.success_to_stdout cryptsetup-1.0.6/src/cryptsetup.c
--- cryptsetup-1.0.6/src/cryptsetup.c.success_to_stdout	2008-11-17 00:03:39.000000000 +0100
+++ cryptsetup-1.0.6/src/cryptsetup.c	2008-11-17 00:04:13.000000000 +0100
@@ -121,7 +121,7 @@ static void show_status(int errcode)
 	char error[256];
 
 	if(!errcode) {
-                fprintf(stderr, _("Command successful.\n"));
+                fprintf(stdout, _("Command successful.\n"));
                 return;
 	}
 


---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux