From d54708399dbab43b2867dad1a41eb199eb0813d8 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 3 Jan 2007 02:58:54 +0000 Subject: fdisk: remove 8k buffer from bss - OSF labels are not THAT common anyway --- util-linux/fdisk_osf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'util-linux/fdisk_osf.c') diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c index 17acd1977..16a046ea3 100644 --- a/util-linux/fdisk_osf.c +++ b/util-linux/fdisk_osf.c @@ -272,12 +272,9 @@ static struct partition *xbsd_part; static int xbsd_part_index; #endif -#if defined(__alpha__) /* We access this through a uint64_t * when checksumming */ -static char disklabelbuffer[BSD_BBSIZE] ATTRIBUTE_ALIGNED(8); -#else -static char disklabelbuffer[BSD_BBSIZE]; -#endif +/* hopefully xmalloc gives us required alignment */ +static char *disklabelbuffer; /*[BSD_BBSIZE]*/ static struct xbsd_disklabel xbsd_dlabel; @@ -299,7 +296,7 @@ check_osf_label(void) } static int -btrydev(const char * dev) +bsd_trydev(const char * dev) { if (xbsd_readlabel(NULL, &xbsd_dlabel) == 0) return -1; @@ -309,7 +306,7 @@ btrydev(const char * dev) } static void -bmenu(void) +bsd_menu(void) { puts(_("Command action")); puts(_("\td\tdelete a BSD partition")); @@ -431,7 +428,7 @@ bsd_select(void) break; #endif default: - bmenu(); + bsd_menu(); break; } } @@ -921,6 +918,9 @@ xbsd_readlabel(struct partition *p, struct xbsd_disklabel *d) { int t, sector; + if (!disklabelbuffer) + disklabelbuffer = xmalloc(BSD_BBSIZE); + /* p is used only to get the starting sector */ #if !defined(__alpha__) sector = (p ? get_start_sect(p) : 0); -- cgit v1.2.3