]> sourceware.org Git - dm.git/commitdiff
Fix dmsetup ls -j and status --target with empty table.
authorAlasdair Kergon <agk@redhat.com>
Fri, 29 Jul 2005 16:11:23 +0000 (16:11 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 29 Jul 2005 16:11:23 +0000 (16:11 +0000)
WHATS_NEW
dmsetup/dmsetup.c

index cca2e24fb3998a81901eab540b185149b384b547..8d1b9ffad73aab7374295ebf50146c5cfaadcbc7 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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
 =============================
   Use matchpathcon mode parameter.
index d0278e08f79ea04049936cafc8a71560c152a1a8..c7ce16a4ef5c5358d28a7fe4dfb7666507fef498 100644 (file)
@@ -757,13 +757,16 @@ static int _status(int argc, char **argv, void *data)
        if (!dm_task_run(dmt))
                goto out;
 
+       if (!name)
+               name = (char *) dm_task_get_name(dmt);
+
        /* Fetch targets and print 'em */
        do {
                next = dm_get_next_target(dmt, next, &start, &length,
                                          &target_type, &params);
                /* Skip if target type doesn't match */
-               if (_switches[TARGET_ARG] && target_type &&
-                   strcmp(target_type, _target))
+               if (_switches[TARGET_ARG] &&
+                   (!target_type || strcmp(target_type, _target)))
                        continue;
                if (ls_only) {
                        if (!_switches[EXEC_ARG] || !_command ||
This page took 0.027673 seconds and 5 git commands to generate.