]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
losetup: use warn_size() for regular files only
authorKarel Zak <kzak@redhat.com>
Mon, 13 May 2013 09:00:47 +0000 (11:00 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 13 May 2013 09:00:47 +0000 (11:00 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/losetup.c

index ccf120e9f4230504f5f658156005af5b42d6a043..b44c9e540f2544ddd4bb2f95c31858926eeb99fa 100644 (file)
@@ -380,7 +380,7 @@ static void warn_size(const char *filename, uint64_t size)
        struct stat st;
 
        if (!size) {
-               if (stat(filename, &st))
+               if (stat(filename, &st) || S_ISBLK(st.st_mode))
                        return;
                size = st.st_size;
        }