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.

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