summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko2009-07-18 16:22:26 +0200
committerDenys Vlasenko2009-07-18 16:22:26 +0200
commit6ae6426a7485b5835c23aea198b3065f491d918b (patch)
tree79ebcee570986e27d7137720ca3139af277a162b /util-linux
parentb71ce023e9527b6afaa497ce62ca53a74cf94cef (diff)
downloadbusybox-6ae6426a7485b5835c23aea198b3065f491d918b.zip
busybox-6ae6426a7485b5835c23aea198b3065f491d918b.tar.gz
fix mountpoint test to not prevemt mkfs_xxx from making image in any file
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/mkfs_minix.c2
-rw-r--r--util-linux/mkfs_vfat.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index ca0b17e..5d1d2af 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -374,7 +374,7 @@ static int ask(const char *string, int def)
*/
static void check_mount(void)
{
- if (find_mount_point(device_name)) {
+ if (find_mount_point(device_name, 0)) {
int cont;
#if ENABLE_FEATURE_MTAB_SUPPORT
/*
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 18512a3..cf75761 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -682,7 +682,7 @@ int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
G.total_blocks = 65535;
/* Check if it is mounted */
- if (find_mount_point(G.device_name))
+ if (find_mount_point(G.device_name, 0))
bb_error_msg_and_die("can't format mounted filesystem");
xmove_fd(xopen(G.device_name, O_RDWR), dev_fd);
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index dff10f9..bdd4dd8 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -279,7 +279,7 @@ int mkfs_vfat_main(int argc UNUSED_PARAM, char **argv)
)
bb_error_msg_and_die("will not try to make filesystem on full-disk device (use -I if wanted)");
// can't work on mounted filesystems
- if (find_mount_point(device_name))
+ if (find_mount_point(device_name, 0))
bb_error_msg_and_die("can't format mounted filesystem");
#endif
// get true sector size