fix mountpoint test to not prevemt mkfs_xxx from making image in any file
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -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
|
||||
/*
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user