From a7d246473451b6c6949af961ab0971bf45c66d62 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 10 Jun 2010 08:25:55 +0100 Subject: [PATCH] blktap2: Fix broken tap-ctl-list type/path filter logic Signed-off-by: Daniel Stodden --- tools/blktap2/control/tap-ctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/blktap2/control/tap-ctl.c b/tools/blktap2/control/tap-ctl.c index 80fc933a89..e254f0724f 100644 --- a/tools/blktap2/control/tap-ctl.c +++ b/tools/blktap2/control/tap-ctl.c @@ -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) -- 2.39.5