libblkid-tiny: allow probing files
[project/ubox.git] / libblkid-tiny / libblkid-tiny.c
index 623ef69..dc18aa7 100644 (file)
@@ -171,7 +171,7 @@ int probe_block(char *block, struct blkid_struct_probe *pr)
        struct stat s;
        int i;
 
-       if (stat(block, &s) || !S_ISBLK(s.st_mode))
+       if (stat(block, &s) || (!S_ISBLK(s.st_mode) && !S_ISREG(s.st_mode)))
                return -1;
 
        pr->err = -1;
@@ -215,4 +215,3 @@ int probe_block(char *block, struct blkid_struct_probe *pr)
 
        return 0;
 }
-