You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
4.2 KiB
109 lines
4.2 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../util-linux/fdisk-devfs.patch |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# Copyright (C) 1998 - 2003 Clifford Wolf |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
--- ./fdisk/fdisk.c.orig 2002-10-11 22:50:24.000000000 +0200 |
|
+++ ./fdisk/fdisk.c 2002-10-11 22:55:30.000000000 +0200 |
|
@@ -198,8 +198,8 @@ |
|
" fdisk -l [-b SSZ] [-u] DISK List partition table(s)\n" |
|
" fdisk -s PARTITION Give partition size(s) in blocks\n" |
|
" fdisk -v Give fdisk version\n" |
|
-"Here DISK is something like /dev/hdb or /dev/sda\n" |
|
-"and PARTITION is something like /dev/hda7\n" |
|
+"Here DISK is something like /dev/discs/disc0/disc\n" |
|
+"and PARTITION is something like /dev/discs/disc0/part1\n" |
|
"-u: give Start and End in sector (instead of cylinder) units\n" |
|
"-b 2048: (for certain MO disks) use 2048-byte sectors\n"); |
|
break; |
|
@@ -207,10 +207,7 @@ |
|
/* msg in cases where fdisk used to probe */ |
|
message = _( |
|
"Usage: fdisk [-l] [-b SSZ] [-u] device\n" |
|
-"E.g.: fdisk /dev/hda (for the first IDE disk)\n" |
|
-" or: fdisk /dev/sdc (for the third SCSI disk)\n" |
|
-" or: fdisk /dev/eda (for the first PS/2 ESDI drive)\n" |
|
-" or: fdisk /dev/rd/c0d0 or: fdisk /dev/ida/c0d0 (for RAID devices)\n" |
|
+"E.g.: fdisk /dev/discs/disc0/disc (for the first disk)\n" |
|
" ...\n"); |
|
break; |
|
case unable_to_open: |
|
@@ -1473,11 +1470,14 @@ |
|
long megabytes = bytes/1000000; |
|
|
|
if (megabytes < 10000) |
|
- printf(_("\nDisk %s: %ld MB, %lld bytes\n"), |
|
- disk_device, megabytes, bytes); |
|
+ printf(_("\nDisk %s:%c%ld MB, %lld bytes\n%s"), |
|
+ disk_device, strlen(disk_device)>30 ? '\n' : ' ', |
|
+ megabytes, bytes, strlen(disk_device)>30 ? "\n" : ""); |
|
else |
|
- printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"), |
|
- disk_device, megabytes/1000, (megabytes/100)%10, bytes); |
|
+ printf(_("\nDisk %s:%c%ld.%ld GB, %lld bytes\n%s"), |
|
+ disk_device, strlen(disk_device)>30 ? '\n' : ' ', |
|
+ megabytes/1000, (megabytes/100)%10, bytes, |
|
+ strlen(disk_device)>30 ? "\n" : ""); |
|
printf(_("%d heads, %d sectors/track, %d cylinders"), |
|
heads, sectors, cylinders); |
|
if (units_per_sector == 1) |
|
--- ./fdisk/partname.c.orig 2002-07-07 14:16:43.000000000 +0200 |
|
+++ ./fdisk/partname.c 2002-10-11 22:50:24.000000000 +0200 |
|
@@ -3,6 +3,8 @@ |
|
#include <string.h> |
|
#include "common.h" |
|
|
|
+int partname_short_name = 0; |
|
+ |
|
/* |
|
* return partition name - uses static storage unless buf is supplied |
|
*/ |
|
@@ -43,5 +45,11 @@ |
|
|
|
char * |
|
partname(char *dev, int pno, int lth) { |
|
- return partnamebf(dev, pno, lth, 0, NULL); |
|
+ static char buf[20]; |
|
+ if ( ! partname_short_name ) { |
|
+ return partnamebf(dev, pno, lth, 0, NULL); |
|
+ } else { |
|
+ sprintf(buf,"Partition %-2u",pno); |
|
+ return buf; |
|
+ } |
|
} |
|
--- ./fdisk/cfdisk.c.orig 2002-10-11 22:50:24.000000000 +0200 |
|
+++ ./fdisk/cfdisk.c 2002-10-11 22:50:24.000000000 +0200 |
|
@@ -93,8 +93,8 @@ |
|
|
|
#define VERSION UTIL_LINUX_VERSION |
|
|
|
-#define DEFAULT_DEVICE "/dev/hda" |
|
-#define ALTERNATE_DEVICE "/dev/sda" |
|
+#define DEFAULT_DEVICE "/dev/discs/disc0/disc" |
|
+#define ALTERNATE_DEVICE "/dev/hda" |
|
|
|
/* With K=1024 we have `binary' megabytes, gigabytes, etc. |
|
Some misguided hackers like that. |
|
--- ./fdisk/sfdisk.c.orig 2002-07-07 02:07:43.000000000 +0200 |
|
+++ ./fdisk/sfdisk.c 2002-10-11 22:50:24.000000000 +0200 |
|
@@ -2229,7 +2229,7 @@ |
|
usage(void) { |
|
version(); |
|
printf(_("Usage: %s [options] device ...\n"), PROGNAME); |
|
- puts (_("device: something like /dev/hda or /dev/sda")); |
|
+ puts (_("device: something like /dev/discs/disc0/disc")); |
|
puts (_("useful options:")); |
|
puts (_(" -s [or --show-size]: list size of a partition")); |
|
puts (_(" -c [or --id]: print or change partition Id"));
|
|
|