diff options
author | Karel Zak | 2006-12-07 00:26:30 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:30 +0100 |
commit | a47f2e66141271cde40ee5190acf93d7878bc93d (patch) | |
tree | f41145d1e432fdb55aabcf600fb9311b7d83d75c /fdisk/fdisk.c | |
parent | Imported from util-linux-2.12l tarball. (diff) | |
download | kernel-qcow2-util-linux-a47f2e66141271cde40ee5190acf93d7878bc93d.tar.gz kernel-qcow2-util-linux-a47f2e66141271cde40ee5190acf93d7878bc93d.tar.xz kernel-qcow2-util-linux-a47f2e66141271cde40ee5190acf93d7878bc93d.zip |
Imported from util-linux-2.12m tarball.
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r-- | fdisk/fdisk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index a8385420c..1aafdd286 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -580,6 +580,9 @@ static int warn_geometry(void) { char *m = NULL; int prev = 0; + + if (sgi_label) /* cannot set cylinders etc anyway */ + return 0; if (!heads) prev = test_c(&m, _("heads")); if (!sectors) @@ -2190,7 +2193,10 @@ reread_partition_table(int leave) { "information.\n")); if (leave) { - close(fd); + if (fsync(fd) || close(fd)) { + fprintf(stderr, _("\nError closing file\n")); + exit(1); + } printf(_("Syncing disks.\n")); sync(); |