summaryrefslogtreecommitdiffstats
path: root/disk-utils/mkfs.bfs.c
diff options
context:
space:
mode:
authorSami Kerola2015-11-22 20:58:26 +0100
committerSami Kerola2015-11-22 21:56:37 +0100
commit98b4f74e1f8f5735e29b6ac37cf4d3dcd77be701 (patch)
tree6fe5e636352fb8adc0f8e8338a13b8cc0dd5b6aa /disk-utils/mkfs.bfs.c
parentmkfs.bfs: fix block device open race (diff)
downloadkernel-qcow2-util-linux-98b4f74e1f8f5735e29b6ac37cf4d3dcd77be701.tar.gz
kernel-qcow2-util-linux-98b4f74e1f8f5735e29b6ac37cf4d3dcd77be701.tar.xz
kernel-qcow2-util-linux-98b4f74e1f8f5735e29b6ac37cf4d3dcd77be701.zip
mkfs.bfs: allow creating file system to a file
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>
Diffstat (limited to 'disk-utils/mkfs.bfs.c')
-rw-r--r--disk-utils/mkfs.bfs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/disk-utils/mkfs.bfs.c b/disk-utils/mkfs.bfs.c
index ff075678b..d66da14eb 100644
--- a/disk-utils/mkfs.bfs.c
+++ b/disk-utils/mkfs.bfs.c
@@ -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);