aboutsummaryrefslogtreecommitdiff
path: root/util-linux/fdisk_osf.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-03 02:58:54 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-03 02:58:54 +0000
commitd54708399dbab43b2867dad1a41eb199eb0813d8 (patch)
tree28d5d123f2babb30d3998febc250a584d92ca065 /util-linux/fdisk_osf.c
parent9b1381fd2fb7179f731709542507015799f90a51 (diff)
downloadbusybox-w32-d54708399dbab43b2867dad1a41eb199eb0813d8.tar.gz
busybox-w32-d54708399dbab43b2867dad1a41eb199eb0813d8.tar.bz2
busybox-w32-d54708399dbab43b2867dad1a41eb199eb0813d8.zip
fdisk: remove 8k buffer from bss - OSF labels
are not THAT common anyway
Diffstat (limited to 'util-linux/fdisk_osf.c')
-rw-r--r--util-linux/fdisk_osf.c16
1 files changed, 8 insertions, 8 deletions
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;
272static int xbsd_part_index; 272static int xbsd_part_index;
273#endif 273#endif
274 274
275#if defined(__alpha__)
276/* We access this through a uint64_t * when checksumming */ 275/* We access this through a uint64_t * when checksumming */
277static char disklabelbuffer[BSD_BBSIZE] ATTRIBUTE_ALIGNED(8); 276/* hopefully xmalloc gives us required alignment */
278#else 277static char *disklabelbuffer; /*[BSD_BBSIZE]*/
279static char disklabelbuffer[BSD_BBSIZE];
280#endif
281 278
282static struct xbsd_disklabel xbsd_dlabel; 279static struct xbsd_disklabel xbsd_dlabel;
283 280
@@ -299,7 +296,7 @@ check_osf_label(void)
299} 296}
300 297
301static int 298static int
302btrydev(const char * dev) 299bsd_trydev(const char * dev)
303{ 300{
304 if (xbsd_readlabel(NULL, &xbsd_dlabel) == 0) 301 if (xbsd_readlabel(NULL, &xbsd_dlabel) == 0)
305 return -1; 302 return -1;
@@ -309,7 +306,7 @@ btrydev(const char * dev)
309} 306}
310 307
311static void 308static void
312bmenu(void) 309bsd_menu(void)
313{ 310{
314 puts(_("Command action")); 311 puts(_("Command action"));
315 puts(_("\td\tdelete a BSD partition")); 312 puts(_("\td\tdelete a BSD partition"));
@@ -431,7 +428,7 @@ bsd_select(void)
431 break; 428 break;
432#endif 429#endif
433 default: 430 default:
434 bmenu(); 431 bsd_menu();
435 break; 432 break;
436 } 433 }
437 } 434 }
@@ -921,6 +918,9 @@ xbsd_readlabel(struct partition *p, struct xbsd_disklabel *d)
921{ 918{
922 int t, sector; 919 int t, sector;
923 920
921 if (!disklabelbuffer)
922 disklabelbuffer = xmalloc(BSD_BBSIZE);
923
924 /* p is used only to get the starting sector */ 924 /* p is used only to get the starting sector */
925#if !defined(__alpha__) 925#if !defined(__alpha__)
926 sector = (p ? get_start_sect(p) : 0); 926 sector = (p ? get_start_sect(p) : 0);