mirror of the now-defunct rocklinux.org
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.

111 lines
4.3 KiB

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