1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

display: fix return values

Return 1 on success in pvdisplay_short() and lvdisplay_full()
so commands like vgdisplay are not printinig stracktraces
on successful passes.

As the results of fail/success have been internally ignored for those
calls, it had no other visible side effect - command's return value was
still 0 (success).
This commit is contained in:
Zdenek Kabelac 2015-03-09 14:16:41 +01:00
parent 1d3711c0b2
commit 47b704462e

View File

@ -385,7 +385,7 @@ int pvdisplay_short(const struct cmd_context *cmd __attribute__((unused)),
char uuid[64] __attribute__((aligned(8)));
if (!pv)
return 0;
return_0;
if (!id_write_format(&pv->id, uuid, sizeof(uuid)))
return_0;
@ -399,7 +399,8 @@ int pvdisplay_short(const struct cmd_context *cmd __attribute__((unused)),
pv->pe_count, pv->pe_count - pv->pe_alloc_count);
log_print(" ");
return 0;
return 1; /* ECMD_PROCESSED */
}
void lvdisplay_colons(const struct logical_volume *lv)
@ -623,7 +624,7 @@ int lvdisplay_full(struct cmd_context *cmd,
log_print(" ");
return 0;
return 1; /* ECMD_PROCESSED */
}
void display_stripe(const struct lv_segment *seg, uint32_t s, const char *pre)