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.

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