]> xenbits.xensource.com Git - xen.git/commitdiff
blktap2: Fix broken tap-ctl-list type/path filter logic
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 10 Jun 2010 07:25:55 +0000 (08:25 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 10 Jun 2010 07:25:55 +0000 (08:25 +0100)
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
tools/blktap2/control/tap-ctl.c

index 80fc933a895ae4be15987017c56c5cdce0de888d..e254f0724f7643b80af92c77440dadc9b98937a2 100644 (file)
@@ -147,10 +147,10 @@ tap_cli_list(int argc, char **argv)
                if (pid >= 0 && entry->pid != pid)
                        continue;
 
-               if (type && entry->type && strcmp(entry->type, type))
+               if (type && (!entry->type || strcmp(entry->type, type)))
                        continue;
 
-               if (file && entry->path && strcmp(entry->path, file))
+               if (file && (!entry->path || strcmp(entry->path, file)))
                        continue;
 
                if (tty)