summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisk.c
diff options
context:
space:
mode:
authorFrancesco Cosoleto2011-12-15 20:02:43 +0100
committerKarel Zak2011-12-16 14:04:04 +0100
commitad30333e1d44119a366ae9db368a94d26557f2c8 (patch)
tree4f9550c6a8233252aa5dbd81d6166754e730b7e8 /fdisk/fdisk.c
parentfdisk: get rid of type_open global variable (diff)
downloadkernel-qcow2-util-linux-ad30333e1d44119a366ae9db368a94d26557f2c8.tar.gz
kernel-qcow2-util-linux-ad30333e1d44119a366ae9db368a94d26557f2c8.tar.xz
kernel-qcow2-util-linux-ad30333e1d44119a366ae9db368a94d26557f2c8.zip
fdisk: get rid of get_boot(create_empty_sun) call
create_sunlabel() should create a new empty SUN disklabel without checking data itself writes to memory and initialize internal related fdisk variables. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r--fdisk/fdisk.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index ab2e68d49..aacd73f59 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -51,6 +51,7 @@
#include "gpt.h"
+static int get_boot(enum action what);
static void delete_partition(int i);
#define hex_val(c) ({ \
@@ -1090,7 +1091,7 @@ void zeroize_mbr_buffer(void)
* 0: found or created label
* 1: I/O error
*/
-int
+static int
get_boot(enum action what) {
int i;
@@ -1108,9 +1109,6 @@ get_boot(enum action what) {
pe->changed = (what == create_empty_dos);
}
- if (what == create_empty_sun && check_sun_label())
- return 0;
-
memset(MBRbuffer, 0, 512);
if (what == create_empty_dos)
@@ -1175,7 +1173,6 @@ got_dos_table:
case try_only:
return -1;
case create_empty_dos:
- case create_empty_sun:
break;
default:
fprintf(stderr, _("Internal error\n"));