OpenSDE Packages Database (without history before r20070)
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

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../util-linux/fdisk-devfs.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- T2-COPYRIGHT-NOTE-END ---
  17. --- ./fdisk/fdisk.c.orig 2002-10-11 22:50:24.000000000 +0200
  18. +++ ./fdisk/fdisk.c 2002-10-11 22:55:30.000000000 +0200
  19. @@ -198,8 +198,8 @@
  20. " fdisk -l [-b SSZ] [-u] DISK List partition table(s)\n"
  21. " fdisk -s PARTITION Give partition size(s) in blocks\n"
  22. " fdisk -v Give fdisk version\n"
  23. -"Here DISK is something like /dev/hdb or /dev/sda\n"
  24. -"and PARTITION is something like /dev/hda7\n"
  25. +"Here DISK is something like /dev/discs/disc0/disc\n"
  26. +"and PARTITION is something like /dev/discs/disc0/part1\n"
  27. "-u: give Start and End in sector (instead of cylinder) units\n"
  28. "-b 2048: (for certain MO disks) use 2048-byte sectors\n");
  29. break;
  30. @@ -207,10 +207,7 @@
  31. /* msg in cases where fdisk used to probe */
  32. message = _(
  33. "Usage: fdisk [-l] [-b SSZ] [-u] device\n"
  34. -"E.g.: fdisk /dev/hda (for the first IDE disk)\n"
  35. -" or: fdisk /dev/sdc (for the third SCSI disk)\n"
  36. -" or: fdisk /dev/eda (for the first PS/2 ESDI drive)\n"
  37. -" or: fdisk /dev/rd/c0d0 or: fdisk /dev/ida/c0d0 (for RAID devices)\n"
  38. +"E.g.: fdisk /dev/discs/disc0/disc (for the first disk)\n"
  39. " ...\n");
  40. break;
  41. case unable_to_open:
  42. @@ -1473,11 +1470,14 @@
  43. long megabytes = bytes/1000000;
  44. if (megabytes < 10000)
  45. - printf(_("\nDisk %s: %ld MB, %lld bytes\n"),
  46. - disk_device, megabytes, bytes);
  47. + printf(_("\nDisk %s:%c%ld MB, %lld bytes\n%s"),
  48. + disk_device, strlen(disk_device)>30 ? '\n' : ' ',
  49. + megabytes, bytes, strlen(disk_device)>30 ? "\n" : "");
  50. else
  51. - printf(_("\nDisk %s: %ld.%ld GB, %lld bytes\n"),
  52. - disk_device, megabytes/1000, (megabytes/100)%10, bytes);
  53. + printf(_("\nDisk %s:%c%ld.%ld GB, %lld bytes\n%s"),
  54. + disk_device, strlen(disk_device)>30 ? '\n' : ' ',
  55. + megabytes/1000, (megabytes/100)%10, bytes,
  56. + strlen(disk_device)>30 ? "\n" : "");
  57. printf(_("%d heads, %d sectors/track, %d cylinders"),
  58. heads, sectors, cylinders);
  59. if (units_per_sector == 1)
  60. --- ./fdisk/partname.c.orig 2002-07-07 14:16:43.000000000 +0200
  61. +++ ./fdisk/partname.c 2002-10-11 22:50:24.000000000 +0200
  62. @@ -3,6 +3,8 @@
  63. #include <string.h>
  64. #include "common.h"
  65. +int partname_short_name = 0;
  66. +
  67. /*
  68. * return partition name - uses static storage unless buf is supplied
  69. */
  70. @@ -43,5 +45,11 @@
  71. char *
  72. partname(char *dev, int pno, int lth) {
  73. - return partnamebf(dev, pno, lth, 0, NULL);
  74. + static char buf[20];
  75. + if ( ! partname_short_name ) {
  76. + return partnamebf(dev, pno, lth, 0, NULL);
  77. + } else {
  78. + sprintf(buf,"Partition %-2u",pno);
  79. + return buf;
  80. + }
  81. }
  82. --- ./fdisk/cfdisk.c.orig 2002-10-11 22:50:24.000000000 +0200
  83. +++ ./fdisk/cfdisk.c 2002-10-11 22:50:24.000000000 +0200
  84. @@ -93,8 +93,8 @@
  85. #define VERSION UTIL_LINUX_VERSION
  86. -#define DEFAULT_DEVICE "/dev/hda"
  87. -#define ALTERNATE_DEVICE "/dev/sda"
  88. +#define DEFAULT_DEVICE "/dev/discs/disc0/disc"
  89. +#define ALTERNATE_DEVICE "/dev/hda"
  90. /* With K=1024 we have `binary' megabytes, gigabytes, etc.
  91. Some misguided hackers like that.
  92. --- ./fdisk/sfdisk.c.orig 2002-07-07 02:07:43.000000000 +0200
  93. +++ ./fdisk/sfdisk.c 2002-10-11 22:50:24.000000000 +0200
  94. @@ -2229,7 +2229,7 @@
  95. usage(void) {
  96. version();
  97. printf(_("Usage: %s [options] device ...\n"), PROGNAME);
  98. - puts (_("device: something like /dev/hda or /dev/sda"));
  99. + puts (_("device: something like /dev/discs/disc0/disc"));
  100. puts (_("useful options:"));
  101. puts (_(" -s [or --show-size]: list size of a partition"));
  102. puts (_(" -c [or --id]: print or change partition Id"));