Patch from Kent Robotti to being fdisk in sync with v2.12 final.

This commit is contained in:
Eric Andersen 2003-08-08 20:04:56 +00:00
parent de6a6ae876
commit 99a75d1376

View File

@ -10,7 +10,7 @@
* Vladimir Oleynik <dzo@simtreas.ru> 2001,2002 Busybox port
*/
#define UTIL_LINUX_VERSION "2.12pre"
#define UTIL_LINUX_VERSION "2.12"
#define PROC_PARTITIONS "/proc/partitions"
@ -1925,11 +1925,9 @@ sgi_get_swappartition(void)
static void
sgi_list_table(int xtra) {
int i, w;
int i, w, wd;
int kpi = 0; /* kernel partition ID */
w = strlen(disk_device);
if(xtra) {
printf(_("\nDisk %s (SGI disk label): %d heads, %d sectors\n"
"%d cylinders, %d physical cylinders\n"
@ -1949,9 +1947,15 @@ sgi_list_table(int xtra) {
disk_device, heads, sectors, cylinders,
str_units(PLURAL), units_per_sector );
}
w = strlen(disk_device);
wd = strlen(_("Device"));
if (w < wd)
w = wd;
printf(_("----- partitions -----\n"
"Pt# %*s Info Start End Sectors Id System\n"),
w + 1, _("Device"));
w + 2, _("Device"));
for (i = 0 ; i < partitions; i++) {
if( sgi_get_num_sectors(i) || debug ) {
uint32_t start = sgi_get_start_sector(i);
@ -1960,7 +1964,7 @@ sgi_list_table(int xtra) {
printf(
"%2d: %s %4s %9ld %9ld %9ld %2x %s\n",
/* fdisk part number */ i+1,
/* device */ partname(disk_device, kpi, w+2),
/* device */ partname(disk_device, kpi, w+3),
/* flags */ (sgi_get_swappartition() == i) ? "swap" :
/* flags */ (sgi_get_bootpartition() == i) ? "boot" : " ",
/* start */ (long) scround(start),