From fb53aa7bc6e2317b74d020ab710c5e943f841ac7 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 6 Apr 2004 16:47:59 +0000 Subject: [PATCH] Fix sysfs filter to check fs type. --- lib/filters/filter-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c index 3e293f47c..a13bd29b2 100644 --- a/lib/filters/filter-sysfs.c +++ b/lib/filters/filter-sysfs.c @@ -26,7 +26,7 @@ static int _locate_sysfs_blocks(const char *proc, char *path, size_t len) char proc_mounts[PATH_MAX]; int r = 0; FILE *fp; - char *split[2], buffer[PATH_MAX + 16]; + char *split[4], buffer[PATH_MAX + 16]; if (!*proc) { log_verbose("No proc filesystem found: skipping sysfs filter"); @@ -45,8 +45,8 @@ static int _locate_sysfs_blocks(const char *proc, char *path, size_t len) } while (fgets(buffer, sizeof(buffer), fp)) { - if (split_words(buffer, 2, split) == 2 && - !strcmp(split[0], "sysfs")) { + if (split_words(buffer, 4, split) == 4 && + !strcmp(split[2], "sysfs")) { if (lvm_snprintf(path, len, "%s/%s", split[1], "block") >= 0) { r = 1;