1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ctdb: don't print OUTPUT: for DISABLED scripts

In other news, did you know ctime() returns a \n-terminated string?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 1b4e7bb548976b99f122142b040494b6f9911962)
This commit is contained in:
Rusty Russell 2009-12-10 20:35:54 +10:30 committed by Ronnie Sahlberg
parent 784fa9fd8a
commit cab8da8dc4

View File

@ -801,10 +801,12 @@ static int control_one_scriptstatus(struct ctdb_context *ctdb,
if (script_status->scripts[i].status != -ENOEXEC) {
printf("%s",
ctime(&script_status->scripts[i].start.tv_sec));
}
if (script_status->scripts[i].status != 0) {
printf(" OUTPUT:%s\n",
script_status->scripts[i].output);
if (script_status->scripts[i].status != 0) {
printf(" OUTPUT:%s\n",
script_status->scripts[i].output);
}
} else {
printf("\n");
}
}
return 0;