blockd: add missing #define _GNU_SOURCE
[project/fstools.git] / probe.c
diff --git a/probe.c b/probe.c
index 7d0e83133cf3e78ebd3ec0a5df904140d9768a16..ab1bc617515a209e0d398a9591922951325bba22 100644 (file)
--- a/probe.c
+++ b/probe.c
@@ -24,23 +24,21 @@ probe_path_tiny(const char *path)
        struct blkid_struct_probe *pr;
        char *type, *dev, *uuid, *label, *version;
 
-       pr = blkid_new_probe();
+       pr = blkidtiny_new_probe();
        if (!pr)
                return NULL;
 
        if (probe_block((char *)path, pr) == 0 && pr->id && !pr->err) {
                info = calloc_a(sizeof(*info),
                                &type,    strlen(pr->id->name) + 1,
-                               &dev,     strlen(pr->dev)      + 1,
+                               &dev,     strlen(path)         + 1,
                                &uuid,    strlen(pr->uuid)     + 1,
                                &label,   strlen(pr->label)    + 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);
+                       info->dev = strcpy(dev, path);
 
                        if (pr->uuid[0])
                                info->uuid = strcpy(uuid, pr->uuid);
@@ -53,7 +51,7 @@ probe_path_tiny(const char *path)
                }
        }
 
-       blkid_free_probe(pr);
+       blkidtiny_free_probe(pr);
 
        return info;
 }