From 601633cc322a7e588dd7c5d650f9b103ba7e25b6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 16 Aug 2013 13:52:51 +0200 Subject: [PATCH] libblkid-tiny: allow probing files --- libblkid-tiny/libblkid-tiny.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libblkid-tiny/libblkid-tiny.c b/libblkid-tiny/libblkid-tiny.c index 623ef69..dc18aa7 100644 --- a/libblkid-tiny/libblkid-tiny.c +++ b/libblkid-tiny/libblkid-tiny.c @@ -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; } - -- 2.25.1