libfstools: silence mkfs.{ext4,f2fs}
[project/fstools.git] / probe.c
diff --git a/probe.c b/probe.c
index 9983a72..63d6f8c 100644 (file)
--- a/probe.c
+++ b/probe.c
@@ -22,7 +22,7 @@ probe_path_tiny(const char *path)
 {
        struct probe_info *info = NULL;
        struct blkid_struct_probe pr = { };
-       char *type, *dev, *uuid, *label, *name, *version;
+       char *type, *dev, *uuid, *label, *version;
 
        if (probe_block((char *)path, &pr) == 0 && pr.id && !pr.err) {
                info = calloc_a(sizeof(*info),
@@ -30,12 +30,11 @@ probe_path_tiny(const char *path)
                                &dev,     strlen(pr.dev)      + 1,
                                &uuid,    strlen(pr.uuid)     + 1,
                                &label,   strlen(pr.label)    + 1,
-                               &name,    strlen(pr.name)     + 1,
                                &version, strlen(pr.version)  + 1);
 
                if (info) {
                        info->type = strcpy(type, pr.id->name);
-                       
+
                        if (pr.dev[0])
                                info->dev = strcpy(dev, pr.dev);
 
@@ -45,9 +44,6 @@ probe_path_tiny(const char *path)
                        if (pr.label[0])
                                info->label = strcpy(label, pr.label);
 
-                       if (pr.name[0])
-                               info->name = strcpy(name, pr.name);
-
                        if (pr.version[0])
                                info->version = strcpy(version, pr.version);
                }
@@ -56,10 +52,17 @@ probe_path_tiny(const char *path)
        return info;
 }
 
-struct probe_info * 
+struct probe_info *
 probe_path(const char *path)
 {
-       return probe_path_tiny(path);
+       struct probe_info *info;
+
+       info = probe_path_tiny(path);
+
+       if (!info)
+               info = probe_path_libblkid(path);
+
+       return info;
 }
 
 int