aboutsummaryrefslogtreecommitdiff
path: root/util-linux/fdisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/fdisk.c')
-rw-r--r--util-linux/fdisk.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 870789112..3b9892fa8 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -2434,23 +2434,9 @@ reread_partition_table(int leave)
2434 printf("Calling ioctl() to re-read partition table\n"); 2434 printf("Calling ioctl() to re-read partition table\n");
2435 sync(); 2435 sync();
2436 /* sleep(2); Huh? */ 2436 /* sleep(2); Huh? */
2437 i = ioctl(fd, BLKRRPART); 2437 i = ioctl_or_perror(fd, BLKRRPART, NULL,
2438#if 0 2438 "WARNING: rereading partition table "
2439 else {
2440 /* some kernel versions (1.2.x) seem to have trouble
2441 rereading the partition table, but if asked to do it
2442 twice, the second time works. - biro@yggdrasil.com */
2443 sync();
2444 sleep(2);
2445 i = ioctl(fd, BLKRRPART);
2446 }
2447#endif
2448
2449 if (i) {
2450 bb_perror_msg("WARNING: rereading partition table "
2451 "failed, kernel still uses old table"); 2439 "failed, kernel still uses old table");
2452 }
2453
2454#if 0 2440#if 0
2455 if (dos_changed) 2441 if (dos_changed)
2456 printf( 2442 printf(