]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkfs.bfs: allow creating file system to a file
authorSami Kerola <kerolasa@iki.fi>
Sun, 22 Nov 2015 19:58:26 +0000 (19:58 +0000)
committerSami Kerola <kerolasa@iki.fi>
Sun, 22 Nov 2015 20:56:37 +0000 (20:56 +0000)
Most, if not all, linux file systems allow this and there should not be a
reason why bfs could not do the same.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/mkfs.bfs.c

index ff075678bc3ec826329ea2d1e4a3221f5dad1c8d..d66da14eb31b9e782522e4b6c0eaa9974c623df1 100644 (file)
@@ -184,9 +184,6 @@ int main(int argc, char **argv)
        if (stat(device, &statbuf) < 0)
                err(EXIT_FAILURE, _("stat of %s failed"), device);
 
-       if (!S_ISBLK(statbuf.st_mode))
-               errx(EXIT_FAILURE, _("%s is not a block special device"), device);
-
        fd = open_blkdev_or_file(&statbuf, device, O_RDWR);
        if (fd < 0)
                err(EXIT_FAILURE, _("cannot open %s"), device);