1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Fix dmsetup ls -j and status --target with empty table.

This commit is contained in:
Alasdair Kergon 2005-07-29 16:11:23 +00:00
parent cc4a9ff522
commit a7c3ee3805
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Version 1.01.04
=============================
Fix dmsetup ls -j and status --target with empty table.
Version 1.01.03 - 13 Jun 2005 Version 1.01.03 - 13 Jun 2005
============================= =============================
Use matchpathcon mode parameter. Use matchpathcon mode parameter.

View File

@ -757,13 +757,16 @@ static int _status(int argc, char **argv, void *data)
if (!dm_task_run(dmt)) if (!dm_task_run(dmt))
goto out; goto out;
if (!name)
name = (char *) dm_task_get_name(dmt);
/* Fetch targets and print 'em */ /* Fetch targets and print 'em */
do { do {
next = dm_get_next_target(dmt, next, &start, &length, next = dm_get_next_target(dmt, next, &start, &length,
&target_type, &params); &target_type, &params);
/* Skip if target type doesn't match */ /* Skip if target type doesn't match */
if (_switches[TARGET_ARG] && target_type && if (_switches[TARGET_ARG] &&
strcmp(target_type, _target)) (!target_type || strcmp(target_type, _target)))
continue; continue;
if (ls_only) { if (ls_only) {
if (!_switches[EXEC_ARG] || !_command || if (!_switches[EXEC_ARG] || !_command ||