aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-08-02 20:18:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-08-02 20:18:29 +0200
commit4cd4eb43320de6ecccb3b69087daee325d0bbfc1 (patch)
tree44db952d0feea229c4359bd5a2f8dc59db5ee07d /util-linux
parent6a98f95373d60d48001299797f52b1f19c7ffecd (diff)
downloadbusybox-w32-4cd4eb43320de6ecccb3b69087daee325d0bbfc1.tar.gz
busybox-w32-4cd4eb43320de6ecccb3b69087daee325d0bbfc1.tar.bz2
busybox-w32-4cd4eb43320de6ecccb3b69087daee325d0bbfc1.zip
apply post-1.14.2 patches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mkfs_minix.c8
-rw-r--r--util-linux/mkfs_vfat.c6
2 files changed, 5 insertions, 9 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 2666132f9..18512a395 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -624,7 +624,6 @@ static void setup_tables(void)
624int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 624int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
625int mkfs_minix_main(int argc UNUSED_PARAM, char **argv) 625int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
626{ 626{
627 struct mntent *mp;
628 unsigned opt; 627 unsigned opt;
629 char *tmp; 628 char *tmp;
630 struct stat statbuf; 629 struct stat statbuf;
@@ -683,11 +682,8 @@ int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
683 G.total_blocks = 65535; 682 G.total_blocks = 65535;
684 683
685 /* Check if it is mounted */ 684 /* Check if it is mounted */
686 mp = find_mount_point(G.device_name, NULL); 685 if (find_mount_point(G.device_name))
687 if (mp && strcmp(G.device_name, mp->mnt_fsname) == 0) 686 bb_error_msg_and_die("can't format mounted filesystem");
688 bb_error_msg_and_die("%s is mounted on %s; "
689 "refusing to make a filesystem",
690 G.device_name, mp->mnt_dir);
691 687
692 xmove_fd(xopen(G.device_name, O_RDWR), dev_fd); 688 xmove_fd(xopen(G.device_name, O_RDWR), dev_fd);
693 if (fstat(dev_fd, &statbuf) < 0) 689 if (fstat(dev_fd, &statbuf) < 0)
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index 72c2058b5..aa6ae92db 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -273,10 +273,10 @@ int mkfs_vfat_main(int argc UNUSED_PARAM, char **argv)
273 device_num == 0x0d00 || // xd 273 device_num == 0x0d00 || // xd
274 device_num == 0x1600 ) // hdc, hdd 274 device_num == 0x1600 ) // hdc, hdd
275 ) 275 )
276 bb_error_msg_and_die("Will not try to make filesystem on full-disk device (use -I if wanted)"); 276 bb_error_msg_and_die("will not try to make filesystem on full-disk device (use -I if wanted)");
277 // can't work on mounted filesystems 277 // can't work on mounted filesystems
278 if (find_mount_point(device_name, NULL)) 278 if (find_mount_point(device_name))
279 bb_error_msg_and_die("Can't format mounted filesystem"); 279 bb_error_msg_and_die("can't format mounted filesystem");
280#endif 280#endif
281 // get true sector size 281 // get true sector size
282 // (parameter must be int*, not long* or size_t*) 282 // (parameter must be int*, not long* or size_t*)