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

Fix return status 0 for "dmsetup info -c -o help".

Solution returns success for _report_init when help is passed,
and caller needs to check for _report existance.
This commit is contained in:
Zdenek Kabelac 2010-08-03 12:56:00 +00:00
parent d87427446c
commit c8675c4933
2 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.54 - Version 1.02.54 -
================================ ================================
Fix return status 0 for "dmsetup info -c -o help".
Add check for kernel semaphore support and disable udev_sync if not available. Add check for kernel semaphore support and disable udev_sync if not available.
Version 1.02.53 - 28th July 2010 Version 1.02.53 - 28th July 2010

View File

@ -2652,6 +2652,9 @@ static int _report_init(struct command *c)
r = 1; r = 1;
out: out:
if (!strcasecmp(options, "help") || !strcmp(options, "?"))
r = 1;
if (len) if (len)
dm_free(options); dm_free(options);
@ -3360,8 +3363,15 @@ int main(int argc, char **argv)
if (!_switches[COLS_ARG] && !strcmp(c->name, "splitname")) if (!_switches[COLS_ARG] && !strcmp(c->name, "splitname"))
_switches[COLS_ARG]++; _switches[COLS_ARG]++;
if (_switches[COLS_ARG] && !_report_init(c)) if (_switches[COLS_ARG]) {
goto out; if (!_report_init(c))
goto out;
if (!_report) {
if (!strcmp(c->name, "info"))
r = 0; /* info -c -o help */
goto out;
}
}
#ifdef UDEV_SYNC_SUPPORT #ifdef UDEV_SYNC_SUPPORT
if (!_set_up_udev_support(dev_dir)) if (!_set_up_udev_support(dev_dir))