s3-smbstatus: Fix exit code of profile output.
authorAndreas Schneider <asn@samba.org>
Mon, 24 Nov 2014 16:46:27 +0000 (17:46 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 4 Dec 2014 18:46:07 +0000 (19:46 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10961

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/status.c

index be7c52fac4644c319515451762d56d7328ac3902..9ce92aafb4b089469c757286019549537573339c 100644 (file)
@@ -363,6 +363,7 @@ static void print_notify_recs(const char *path,
        TALLOC_CTX *frame = talloc_stackframe();
        int ret = 0;
        struct messaging_context *msg_ctx;
+       bool ok;
 
        sec_init();
        load_case_tables();
@@ -462,10 +463,12 @@ static void print_notify_recs(const char *path,
        switch (profile_only) {
                case 'P':
                        /* Dump profile data */
-                       return status_profile_dump(verbose);
+                       ok = status_profile_dump(verbose);
+                       return ok ? 0 : 1;
                case 'R':
                        /* Continuously display rate-converted data */
-                       return status_profile_rates(verbose);
+                       ok = status_profile_rates(verbose);
+                       return ok ? 0 : 1;
                default:
                        break;
        }