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.

412 lines
11 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/powerpc/quik/lib_update.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. --- ./quik/quik.c 2002-06-05 08:04:29.000000000 -0400
  23. +++ ./quik/quik.c 2002-12-14 19:04:12.000000000 -0500
  24. @@ -225,7 +225,7 @@
  25. strcat(buffer, path + 1);
  26. return buffer;
  27. } else
  28. - return strdup(path);
  29. + return (char *) strdup(path);
  30. }
  31. void write_block_table(char *device, char *config_file, int partno)
  32. --- ./second/cfg.c 2002-06-05 08:04:29.000000000 -0400
  33. +++ ./second/cfg.c 2002-12-14 18:53:49.000000000 -0500
  34. @@ -98,10 +98,10 @@
  35. va_list ap;
  36. va_start (ap, msg);
  37. - printf ("Config file error: ");
  38. - vprintf (msg, ap);
  39. + q_printf ("Config file error: ");
  40. + q_vprintf (msg, ap);
  41. va_end (ap);
  42. - printf (" near line %d in file %s\n", line_num, file_name);
  43. + q_printf (" near line %d in file %s\n", line_num, file_name);
  44. longjmp (env, 1);
  45. }
  46. @@ -110,10 +110,10 @@
  47. va_list ap;
  48. va_start (ap, msg);
  49. - printf ("Config file warning: ");
  50. - vprintf (msg, ap);
  51. + q_printf ("Config file warning: ");
  52. + q_vprintf (msg, ap);
  53. va_end (ap);
  54. - printf (" near line %d in file %s\n", line_num, file_name);
  55. + q_printf (" near line %d in file %s\n", line_num, file_name);
  56. }
  57. inline int getc ()
  58. @@ -371,8 +371,8 @@
  59. int len = strlen (label);
  60. if (!printl_count)
  61. - printf ("\n");
  62. - printf ("%s", label);
  63. + q_printf ("\n");
  64. + q_printf ("%s", label);
  65. while (len++ < 25)
  66. putchar (' ');
  67. printl_count++;
  68. @@ -399,7 +399,7 @@
  69. if (alias)
  70. printlabel (alias);
  71. }
  72. - printf ("\nYou can also type in custom image locations, in the form\n"
  73. + q_printf ("\nYou can also type in custom image locations, in the form\n"
  74. "{prom_path;}partno/path_to_image or {prom_path;}{partno}[start-end]\n");
  75. }
  76. --- ./second/disk.c 2000-03-10 15:59:28.000000000 -0500
  77. +++ ./second/disk.c 2002-12-14 18:54:37.000000000 -0500
  78. @@ -10,7 +10,7 @@
  79. {
  80. current_dev = call_prom("open", 1, 1, device);
  81. if (current_dev == (ihandle) 0 || current_dev == (ihandle) -1) {
  82. - printf("\nCouldn't open %s\n", device);
  83. + q_printf("\nCouldn't open %s\n", device);
  84. return -1;
  85. }
  86. strcpy(current_devname, device);
  87. @@ -53,7 +53,7 @@
  88. * just a few partitions. -- Cort
  89. */
  90. if ( is_chrp )
  91. - sprintf(bootdevice, "disk:0");
  92. + q_sprintf(bootdevice, "disk:0");
  93. if( open(bootdevice) )
  94. {
  95. /*
  96. @@ -61,7 +61,7 @@
  97. * try this if disk:0 fails
  98. * -- Cort
  99. */
  100. - sprintf(bootdevice, "/pci@fee00000/scsi@c/sd@8:0");
  101. + q_sprintf(bootdevice, "/pci@fee00000/scsi@c/sd@8:0");
  102. return open(bootdevice);
  103. }
  104. return 0;
  105. --- ./second/file.c 2002-06-05 08:04:29.000000000 -0400
  106. +++ ./second/file.c 2002-12-14 18:59:19.000000000 -0500
  107. @@ -23,7 +23,7 @@
  108. #include <sys/types.h>
  109. #include <errno.h>
  110. #include "quik.h"
  111. -typedef int FILE;
  112. +typedef int q_FILE;
  113. #include <linux/ext2_fs.h>
  114. #include <ext2fs/ext2fs.h>
  115. #include <setjmp.h>
  116. @@ -155,7 +155,7 @@
  117. /* check the MSDOS partition magic */
  118. if ( (blk[0x1fe] != 0x55) || (blk[0x1ff] != 0xaa) )
  119. {
  120. - printf("No MSDOS partition magic number on disk!\n");
  121. + q_printf("No MSDOS partition magic number on disk!\n");
  122. return 0;
  123. }
  124. if ( part >= 4 )
  125. @@ -167,14 +167,14 @@
  126. return 1;
  127. }
  128. -int sprintf (char *buf, char *fmt,...)
  129. +int q_sprintf (char *buf, char *fmt,...)
  130. {
  131. strcpy (buf, fmt);
  132. }
  133. void com_err (const char *a, long i, const char *fmt,...)
  134. {
  135. - printf ((char *) fmt);
  136. + q_printf ((char *) fmt);
  137. }
  138. static errcode_t linux_open (const char *name, int flags, io_channel * channel)
  139. @@ -222,7 +222,7 @@
  140. tempb = (((long long) block) * ((long long)bs)) + doff;
  141. size = (count < 0) ? -count : count * bs;
  142. if (read (data, size, tempb) != size) {
  143. - printf ("\nRead error on block %d", block);
  144. + q_printf ("\nRead error on block %d", block);
  145. return EXT2_ET_SHORT_READ;
  146. }
  147. return 0;
  148. @@ -253,7 +253,7 @@
  149. static char rot[] = "\\|/-";
  150. if (!(i % freq))
  151. - printf ("%c\b", rot[(i / freq) % 4]);
  152. + q_printf ("%c\b", rot[(i / freq) % 4]);
  153. i++;
  154. }
  155. @@ -314,7 +314,7 @@
  156. block_cnt = 0;
  157. retval = ext2fs_block_iterate(fs, inode, 0, 0, dump_block, 0);
  158. if (retval) {
  159. - printf ("Error %d reading %s", retval, filename);
  160. + q_printf ("Error %d reading %s", retval, filename);
  161. return 0;
  162. }
  163. return dump_finish();
  164. @@ -342,7 +342,7 @@
  165. }
  166. }
  167. if (end == -1) {
  168. - printf ("\n"
  169. + q_printf ("\n"
  170. "Ranges of physical blocks are specified as {prom_path:}{partno}[xx-yy]\n"
  171. "where {} means optional part, partno defaults to 0 (i.e. whole disk)\n"
  172. "and xx is the starting block (chunk of 512 bytes) and yy end (not\n"
  173. @@ -369,7 +369,7 @@
  174. }
  175. }
  176. }
  177. - printf ("\nInternal error while loading blocks from device\n");
  178. + q_printf ("\nInternal error while loading blocks from device\n");
  179. return 0;
  180. }
  181. @@ -406,7 +406,7 @@
  182. }
  183. type = ext2;
  184. if (retval = ext2fs_namei(fs, root, cwd, filename, &inode)) {
  185. - printf("\nInode error #%d while loading file %s.", retval, filename);
  186. + q_printf("\nInode error #%d while loading file %s.", retval, filename);
  187. ext2fs_close(fs);
  188. return 0;
  189. }
  190. --- ./second/main.c 2002-06-05 08:04:29.000000000 -0400
  191. +++ ./second/main.c 2002-12-14 18:57:18.000000000 -0500
  192. @@ -57,14 +57,14 @@
  193. void fatal(const char *msg)
  194. {
  195. - printf("\nFatal error: %s\n", msg);
  196. + q_printf("\nFatal error: %s\n", msg);
  197. }
  198. void maintabfunc (void)
  199. {
  200. if (useconf) {
  201. cfg_print_images();
  202. - printf("boot: %s", cbuff);
  203. + q_printf("boot: %s", cbuff);
  204. }
  205. }
  206. @@ -217,7 +217,7 @@
  207. if (useconf && (q = cfg_get_strg(0, "timeout")) != 0 && *q != 0)
  208. timeout = strtol(q, NULL, 0);
  209. }
  210. - printf("boot: ");
  211. + q_printf("boot: ");
  212. c = -1;
  213. if (timeout != -1) {
  214. beg = get_ms();
  215. @@ -232,14 +232,14 @@
  216. }
  217. if (c == '\n') {
  218. - printf("%s", imagename);
  219. + q_printf("%s", imagename);
  220. if (*params)
  221. - printf(" %s", *params);
  222. - printf("\n");
  223. + q_printf(" %s", *params);
  224. + q_printf("\n");
  225. } else {
  226. cmdinit();
  227. cmdedit(maintabfunc, c);
  228. - printf("\n");
  229. + q_printf("\n");
  230. strcpy(given_bootargs, cbuff);
  231. given_bootargs_by_user = 1;
  232. imagename = cbuff;
  233. @@ -296,7 +296,7 @@
  234. if (!*device)
  235. *device = defdevice;
  236. if (!*kname)
  237. - printf(
  238. + q_printf(
  239. "Enter the kernel image name as [device:][partno]/path, where partno is a\n"
  240. "number from 0 to 16. Instead of /path you can type [mm-nn] to specify a\n"
  241. "range of disk blocks (512B)\n");
  242. @@ -328,7 +328,7 @@
  243. device = cfg_get_strg(0, "device");
  244. if (load_file(device, part, kname, TMP_BUF, TMP_END, &len, 1, 0)) {
  245. TMP_BUF[len] = 0;
  246. - printf("\n%s", (char *)TMP_BUF);
  247. + q_printf("\n%s", (char *)TMP_BUF);
  248. }
  249. }
  250. }
  251. @@ -377,7 +377,7 @@
  252. if ( (unsigned long)prom_entry == 0x426f6f58 )
  253. {
  254. - printf("BootX launched us\n");
  255. + q_printf("BootX launched us\n");
  256. prom_entry = (void *)id;
  257. /*
  258. * These should come from the bootx info.
  259. @@ -391,7 +391,7 @@
  260. memset(&__bss_start, 0, &_end - &__bss_start);
  261. prom_init(prom_entry);
  262. - printf("Second-stage QUIK loader\n");
  263. + q_printf("Second-stage QUIK loader\n");
  264. if (diskinit() == -1)
  265. prom_exit();
  266. @@ -403,24 +403,24 @@
  267. fileok = load_file(0, quik_conf_part, quik_conf,
  268. TMP_BUF, TMP_END, &len, 1, 0);
  269. if (!fileok || (unsigned) len >= 65535)
  270. - printf("\nCouldn't load %s\n", quik_conf);
  271. + q_printf("\nCouldn't load %s\n", quik_conf);
  272. else {
  273. char *p;
  274. if (cfg_parse(quik_conf, TMP_BUF, len) < 0)
  275. - printf ("Syntax error or read error in %s.\n", quik_conf);
  276. + q_printf ("Syntax error or read error in %s.\n", quik_conf);
  277. useconf = 1;
  278. p = cfg_get_strg(0, "init-code");
  279. if (p)
  280. call_prom("interpret", 1, 1, p);
  281. p = cfg_get_strg(0, "init-message");
  282. if (p)
  283. - printf("%s", p);
  284. + q_printf("%s", p);
  285. p = cfg_get_strg(0, "message");
  286. if (p)
  287. print_message_file(p);
  288. }
  289. } else
  290. - printf ("\n");
  291. + q_printf ("\n");
  292. for (;;) {
  293. get_params(&device, &part, &kname, &params);
  294. @@ -431,11 +431,11 @@
  295. TMP_BUF, TMP_END, &image_len, 1, 0);
  296. if (!fileok) {
  297. - printf ("\nImage not found.... try again\n");
  298. + q_printf ("\nImage not found.... try again\n");
  299. continue;
  300. }
  301. if (image_len > TMP_END - TMP_BUF) {
  302. - printf("\nImage is too large (%u > %u)\n", image_len,
  303. + q_printf("\nImage is too large (%u > %u)\n", image_len,
  304. TMP_END - TMP_BUF);
  305. continue;
  306. }
  307. @@ -448,13 +448,13 @@
  308. e->e_ident[EI_MAG1] == ELFMAG1 &&
  309. e->e_ident[EI_MAG2] == ELFMAG2 &&
  310. e->e_ident[EI_MAG3] == ELFMAG3)) {
  311. - printf ("\n%s: unknown image format\n", kname);
  312. + q_printf ("\n%s: unknown image format\n", kname);
  313. continue;
  314. }
  315. if (e->e_ident[EI_CLASS] != ELFCLASS32
  316. || e->e_ident[EI_DATA] != ELFDATA2MSB) {
  317. - printf("Image is not a 32bit MSB ELF image\n");
  318. + q_printf("Image is not a 32bit MSB ELF image\n");
  319. continue;
  320. }
  321. len = 0;
  322. @@ -470,7 +470,7 @@
  323. len = p->p_offset + p->p_filesz - off;
  324. }
  325. if (len == 0) {
  326. - printf("Cannot find a loadable segment in ELF image\n");
  327. + q_printf("Cannot find a loadable segment in ELF image\n");
  328. continue;
  329. }
  330. entry = e->e_entry & ADDRMASK;
  331. @@ -488,9 +488,9 @@
  332. close();
  333. if (pause_after) {
  334. - printf("%s", pause_message);
  335. + q_printf("%s", pause_message);
  336. prom_pause();
  337. - printf("\n");
  338. + q_printf("\n");
  339. }
  340. /*
  341. @@ -509,12 +509,12 @@
  342. /* doesn't look like a procedure descriptor */
  343. start += entry;
  344. }
  345. - printf("Starting at %x\n", start);
  346. + q_printf("Starting at %x\n", start);
  347. #ifdef BOOTINFO
  348. /* setup the bootinfo */
  349. binf.magic_start = bin.magic_end = BOOT_INFO_MAGIC;
  350. - sprintf( binf.cmd_line, "%s", params );
  351. - sprintf( binf.boot_loader, "Quik" );
  352. + q_sprintf( binf.cmd_line, "%s", params );
  353. + q_sprintf( binf.boot_loader, "Quik" );
  354. if ( is_chrp )
  355. binf._machine = _MACH_chrp;
  356. else
  357. --- ./second/printf.c 2000-03-10 15:59:28.000000000 -0500
  358. +++ ./second/printf.c 2002-12-14 18:58:02.000000000 -0500
  359. @@ -20,23 +20,23 @@
  360. #include "quik.h"
  361. static void printn(long, int);
  362. -extern void vprintf(char *, va_list);
  363. +extern void q_vprintf(char *, va_list);
  364. /*
  365. * Scaled down version of C Library printf.
  366. * Only %c %s %u %d (==%u) %o %x %D %O are recognized.
  367. */
  368. -void printf (char *fmt,...)
  369. +void q_printf (char *fmt,...)
  370. {
  371. va_list x1;
  372. va_start (x1, fmt);
  373. - vprintf (fmt, x1);
  374. + q_vprintf (fmt, x1);
  375. va_end (x1);
  376. }
  377. -void vprintf (char *fmt, va_list adx)
  378. +void q_vprintf (char *fmt, va_list adx)
  379. {
  380. register c;
  381. char *s;