[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r4191 - trunk/OpenDNSSEC/libhsm/src

Jakob Schlyter jakob at kirei.se
Tue Nov 16 09:51:57 CET 2010


Author: jakob
Date: 2010-11-16 09:51:56 +0100 (Tue, 16 Nov 2010)
New Revision: 4191

Modified:
   trunk/OpenDNSSEC/libhsm/src/hsmutil.c
Log:
send non-data to stderr

Modified: trunk/OpenDNSSEC/libhsm/src/hsmutil.c
===================================================================
--- trunk/OpenDNSSEC/libhsm/src/hsmutil.c	2010-11-15 16:19:24 UTC (rev 4190)
+++ trunk/OpenDNSSEC/libhsm/src/hsmutil.c	2010-11-16 08:51:56 UTC (rev 4191)
@@ -96,14 +96,14 @@
            return 1;
         }
 
-        printf("Listing keys in repository: %s\n", repository);
+        fprintf(stderr, "Listing keys in repository: %s\n", repository);
         keys = hsm_list_keys_repository(NULL, &key_count, repository);
     } else {
-        printf("Listing keys in all repositories.\n");
+        fprintf(stderr, "Listing keys in all repositories.\n");
         keys = hsm_list_keys(NULL, &key_count);
     }
 
-    printf("%u %s found.\n\n", (unsigned int) key_count,
+    fprintf(stderr, "%u %s found.\n\n", (unsigned int) key_count,
         (key_count > 1 || key_count == 0 ? "keys" : "key"));
 
     if (!keys) {
@@ -111,8 +111,8 @@
     }
 
     /* print fancy header */
-    printf(key_info_format, "Repository", "ID", "Type");
-    printf(key_info_format, "----------", "--", "----");
+    fprintf(stderr, key_info_format, "Repository", "ID", "Type");
+    fprintf(stderr, key_info_format, "----------", "--", "----");
 
     for (i = 0; i < key_count; i++) {
         hsm_key_info_t *key_info;
@@ -149,7 +149,7 @@
         size_t invalid_keys;
         invalid_keys = key_count - key_count_valid;
         printf("\n");
-        printf("Warning: %u %s not usable by OpenDNSSEC was found.\n",
+        fprintf(stderr, "Warning: %u %s not usable by OpenDNSSEC was found.\n",
             invalid_keys, invalid_keys > 1 ? "keys" : "key");
     }
 




More information about the Opendnssec-commits mailing list