diff --git a/disk-utils/mkfs.bfs.c b/disk-utils/mkfs.bfs.c index 70571945d..ff075678b 100644 --- a/disk-utils/mkfs.bfs.c +++ b/disk-utils/mkfs.bfs.c @@ -187,7 +187,7 @@ int main(int argc, char **argv) if (!S_ISBLK(statbuf.st_mode)) errx(EXIT_FAILURE, _("%s is not a block special device"), device); - fd = open(device, O_RDWR | O_EXCL); + fd = open_blkdev_or_file(&statbuf, device, O_RDWR); if (fd < 0) err(EXIT_FAILURE, _("cannot open %s"), device);