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.

166 lines
5.1 KiB

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