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.

168 lines
5.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/dietlibc/pkg_patch/pkg_lilo.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. --- lilo-22.5.6/partition.h.orig Fri Jun 6 19:07:45 2003
  20. +++ lilo-22.5.6/partition.h Fri Sep 5 17:42:53 2003
  21. @@ -19,9 +19,9 @@
  22. enum {PTW_OKAY=0, PTW_DOS=1, PTW_OS2=2, PTW_SWAP, PTW_XFS,
  23. PTW_mask=7, PTW_NTFS=8};
  24. -#if 1
  25. -
  26. #define LLSECTORSIZE ((long long)SECTOR_SIZE)
  27. +
  28. +#ifndef __dietlibc__
  29. loff_t llseek(unsigned int fd, loff_t offs, unsigned int whence);
  30. --- lilo-22.5.6/partition.c.orig Fri Sep 5 17:41:58 2003
  31. +++ lilo-22.5.6/partition.c Fri Sep 5 17:47:18 2003
  32. @@ -9,7 +9,9 @@
  33. */
  34. -
  35. +#ifdef __dietlibc__
  36. +#include <asm/posix_types.h>
  37. +#endif
  38. #include <stdlib.h>
  39. #include <unistd.h>
  40. #include <stdio.h>
  41. @@ -35,7 +37,7 @@
  42. #include "loader.h"
  43. -
  44. +#ifndef __dietlibc__
  45. _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
  46. loff_t *, res, uint, wh);
  47. @@ -48,6 +50,7 @@
  48. return _llseek(fd, offs>>32, offs, &res, whence) < 0 ?
  49. (loff_t)(-1) : res;
  50. }
  51. +#endif
  52. static
  53. int anywhere(void *buf, unsigned char *str)
  54. @@ -185,8 +188,13 @@
  55. }
  56. i=5;
  57. while (i<=pe && base) {
  58. +#ifdef __dietlibc__
  59. + if (lseek(fd, LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET, SEEK_SET) < 0)
  60. + die("secondary lseek failed");
  61. +#else
  62. if (llseek(fd, LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET, SEEK_SET) < 0)
  63. die("secondary llseek failed");
  64. +#endif
  65. if (read(fd, part_table, sizeof(part_table)) != sizeof(part_table)) die("secondary read pt failed");
  66. if ( read(fd, &boot_sig, sizeof(boot_sig)) != sizeof(boot_sig) ||
  67. boot_sig != BOOT_SIGNATURE ) die("read second boot signature failed");
  68. @@ -609,7 +617,11 @@
  69. if (pt[count].sys_ind && pt[count].boot_ind != flag) {
  70. pt[count].boot_ind = flag;
  71. printf("pt[%d] -> %2x\n", count+1, (int)flag);
  72. +#ifdef __dietlibc__
  73. + if (lseek(fd, daddr[count], SEEK_SET) < 0) die("PT lseek failed");
  74. +#else
  75. if (llseek(fd, daddr[count], SEEK_SET) < 0) die("PT llseek failed");
  76. +#endif
  77. if (!test)
  78. if (write(fd, &pt[count], sizeof(pt[0])) != sizeof(pt[0]) )
  79. die("PT write failure");
  80. @@ -793,8 +805,13 @@
  81. if (max>0)
  82. while (base) {
  83. daddr = LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET;
  84. +#ifdef __dietlibc__
  85. + if (lseek(fd, daddr, SEEK_SET) < 0)
  86. + die("secondary lseek failed");
  87. +#else
  88. if (llseek(fd, daddr, SEEK_SET) < 0)
  89. die("secondary llseek failed");
  90. +#endif
  91. if (read(fd, pt, sizeof(pt)) != sizeof(pt)) die("secondary read pt failed");
  92. if ( read(fd, &boot_sig, sizeof(boot_sig)) != sizeof(boot_sig) ||
  93. boot_sig != BOOT_SIGNATURE ) die("read second boot signature failed");
  94. --- lilo-22.5.6/Makefile~ Mon Jun 30 03:45:19 2003
  95. +++ lilo-22.5.6/Makefile Fri Sep 5 18:27:38 2003
  96. @@ -51,7 +51,7 @@
  97. # XL_SECS=n Support for extra large (non-standard) floppies.
  98. CONFIG=-DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DONE_SHOT -DPASS160 \
  99. - -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL
  100. + -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL
  101. # set the compiler optimization level
  102. --- lilo-22.5.6/boot.c~ Tue Jun 24 22:23:10 2003
  103. +++ lilo-22.5.6/boot.c Fri Sep 5 18:35:27 2003
  104. @@ -17,7 +17,11 @@
  105. #include <ctype.h>
  106. #include <fcntl.h>
  107. #include <errno.h>
  108. +#ifdef __dietlibc__
  109. +#include <linux/a.out.h>
  110. +#else
  111. #include <a.out.h>
  112. +#endif
  113. #include <sys/stat.h>
  114. #include "config.h"
  115. --- lilo-22.5.6/bsect.c.orig Mon Jun 30 02:34:44 2003
  116. +++ lilo-22.5.6/bsect.c Fri Sep 5 18:41:20 2003
  117. @@ -12,7 +12,9 @@
  118. #include <unistd.h>
  119. #include <sys/types.h>
  120. +#ifndef __dietlibc__
  121. #include <sys/statfs.h>
  122. +#endif
  123. #include <sys/stat.h>
  124. #include <stdio.h>
  125. #include <fcntl.h>
  126. --- lilo-22.5.6/partition.c~ Fri Sep 5 17:47:18 2003
  127. +++ lilo-22.5.6/partition.c Fri Sep 5 18:44:06 2003
  128. @@ -19,7 +19,11 @@
  129. #include <ctype.h>
  130. #include <fcntl.h>
  131. #include <errno.h>
  132. +#ifdef __dietlibc__
  133. +#include <linux/a.out.h>
  134. +#else
  135. #include <a.out.h>
  136. +#endif
  137. #include <sys/stat.h>
  138. #include <sys/types.h>
  139. #include <asm/unistd.h>
  140. --- lilo-22.5.6/edit.c.orig Sun Feb 23 19:14:12 2003
  141. +++ lilo-22.5.6/edit.c Mon Sep 8 07:48:20 2003
  142. @@ -10,7 +10,11 @@
  143. #include <unistd.h>
  144. #include <sys/types.h>
  145. +#ifdef __dietlibc__
  146. +#include <sys/vfs.h>
  147. +#else
  148. #include <sys/statfs.h>
  149. +#endif
  150. #include <sys/stat.h>
  151. #include <stdio.h>
  152. #include <stdlib.h>