[PATCH] s3-smbstatus: Fix exit code of profile output.
Jeremy Allison
jra at samba.org
Mon Nov 24 10:51:52 MST 2014
On Mon, Nov 24, 2014 at 05:46:27PM +0100, Andreas Schneider wrote:
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10961
>
> Signed-off-by: Andreas Schneider <asn at samba.org>
> ---
> source3/utils/status.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/source3/utils/status.c b/source3/utils/status.c
> index 64c2a93..4e1dae7 100644
> --- a/source3/utils/status.c
> +++ b/source3/utils/status.c
> @@ -364,6 +364,7 @@ int main(int argc, const char *argv[])
> int ret = 0;
> struct messaging_context *msg_ctx;
> char *db_path;
> + bool ok;
>
> sec_init();
> load_case_tables();
> @@ -463,10 +464,12 @@ int main(int argc, const char *argv[])
> 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;
> }
> --
> 2.1.2
LGTM - pushed. Thanks !
More information about the samba-technical
mailing list