summaryrefslogtreecommitdiff
path: root/tools/vgdisplay.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2008-06-10 20:07:04 +0000
committerDave Wysochanski <dwysocha@redhat.com>2008-06-10 20:07:04 +0000
commit3a30d1db20c88a7c823ad18c13c693bcc1b15d80 (patch)
tree00678debc8045d412db727c2151b87557eceffbc /tools/vgdisplay.c
parenta3678fa1862157a3b5f2e1208dcf2de16be3b3d4 (diff)
downloadlvm2-3a30d1db20c88a7c823ad18c13c693bcc1b15d80.tar.gz
Fix return values for reporting commands when run with no PVs, LVs, or VGs.
The new error checking code caught some commands that were returning '0' as an exit status for success. This is incorrect and resulted in a benign error message displayed (see below). As of today, all commands should return a value defined in lib/commands/errors.h (1-5). This results in an exit code of 0 on success, or > 0 on failure (as stated in the lvm.8 man page). Before change: 1. Make sure no PVs are on the system 2. Run 'pvs' Command failed with status code 0. After change: <no output>
Diffstat (limited to 'tools/vgdisplay.c')
-rw-r--r--tools/vgdisplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/vgdisplay.c b/tools/vgdisplay.c
index cc51bcab1..532cc1886 100644
--- a/tools/vgdisplay.c
+++ b/tools/vgdisplay.c
@@ -113,5 +113,5 @@ int vgdisplay(struct cmd_context *cmd, int argc, char **argv)
}
************/
- return 0;
+ return ECMD_PROCESSED;
}