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.

100 lines
3.1 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_module-init-tools.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. --- ./insmod.c.orig 2003-04-06 12:21:21.000000000 +0200
  23. +++ ./insmod.c 2003-04-06 12:21:23.000000000 +0200
  24. @@ -53,6 +53,8 @@
  25. }
  26. }
  27. +static inline _syscall3(long int,init_module,void*,map,unsigned long,len,char*,options);
  28. +
  29. int main(int argc, char *argv[])
  30. {
  31. unsigned int i;
  32. @@ -108,7 +110,7 @@
  33. exit(1);
  34. }
  35. - ret = syscall(__NR_init_module, map, len, options);
  36. + ret = init_module(map, len, options);
  37. if (ret != 0) {
  38. fprintf(stderr, "Error inserting '%s': %li %s\n",
  39. filename, ret, moderror(errno));
  40. --- ./rmmod.c.orig 2003-04-06 12:26:27.000000000 +0200
  41. +++ ./rmmod.c 2003-04-06 12:25:30.000000000 +0200
  42. @@ -168,6 +168,8 @@
  43. modname[i] = '\0';
  44. }
  45. +static inline _syscall2(long int,delete_module,char*,name,int,flags);
  46. +
  47. static void rmmod(int log, int verbose, const char *path, int flags)
  48. {
  49. long ret;
  50. @@ -184,7 +186,7 @@
  51. (flags & O_NONBLOCK) ? "no" : "yes",
  52. (flags & O_TRUNC) ? " force" : "");
  53. - ret = syscall(__NR_delete_module, name, flags);
  54. + ret = delete_module(name, flags);
  55. if (ret != 0)
  56. error(log, "Removing '%s': %s\n", name, strerror(errno));
  57. }
  58. --- ./modprobe.c.orig 2003-04-06 12:24:37.000000000 +0200
  59. +++ ./modprobe.c 2003-04-06 12:25:46.000000000 +0200
  60. @@ -672,6 +672,8 @@
  61. }
  62. }
  63. +static inline _syscall3(long int,init_module,void*,map,unsigned long,len,char*,options);
  64. +
  65. /* Actually do the insert. Frees second arg. */
  66. static void insmod(struct list_head *list,
  67. char *optstring,
  68. @@ -754,7 +756,7 @@
  69. if (dry_run)
  70. goto out;
  71. - ret = syscall(__NR_init_module, map, st.st_size, optstring);
  72. + ret = init_module(map, st.st_size, optstring);
  73. if (ret != 0) {
  74. if (dont_fail)
  75. fatal("Error inserting %s (%s): %s\n",
  76. @@ -771,6 +773,8 @@
  77. free(optstring);
  78. }
  79. +static inline _syscall2(long int,delete_module,char*,name,int,flags);
  80. +
  81. /* Do recursive removal. */
  82. static void rmmod(struct list_head *list,
  83. int dont_fail,
  84. @@ -810,7 +814,7 @@
  85. if (dry_run)
  86. goto remove_rest;
  87. - if (syscall(__NR_delete_module, mod->modname, O_EXCL) != 0) {
  88. + if (delete_module(mod->modname, O_EXCL) != 0) {
  89. if (dont_fail)
  90. fatal("Error removing %s (%s): %s\n",
  91. mod->modname, mod->filename,