considering we update modutils and patch dietlibc to support it just before rc3 :-), i'll send the patch to: - update module-init-tools to 0.9.14 - fix dietlibc adding vasprintf from current snapshot - removes patch for building it with dietlibc builds in bootdisk and generic git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1774 c5f82cb5-29bc-0310-9cd0-bff59a50e3bcrocklinux
@ -0,0 +1,46 @@ |
|||||
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
||||
|
# |
||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
|
# Please add additional copyright information _after_ the line containing |
||||
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
||||
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
||||
|
# |
||||
|
# ROCK Linux: rock-src/package/base/dietlibc/adds_vasprintf_c.patch |
||||
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
||||
|
# |
||||
|
# This program is free software; you can redistribute it and/or modify |
||||
|
# it under the terms of the GNU General Public License as published by |
||||
|
# the Free Software Foundation; either version 2 of the License, or |
||||
|
# (at your option) any later version. A copy of the GNU General Public |
||||
|
# License can be found at Documentation/COPYING. |
||||
|
# |
||||
|
# Many people helped and are helping developing ROCK Linux. Please |
||||
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
||||
|
# file for details. |
||||
|
# |
||||
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
||||
|
|
||||
|
diff -u -rduN dietlibc-0.22.orig/libugly/vasprintf.c dietlibc-0.22/libugly/vasprintf.c
|
||||
|
--- dietlibc-0.22.orig/libugly/vasprintf.c 1969-12-31 21:00:00.000000000 -0300
|
||||
|
+++ dietlibc-0.22/libugly/vasprintf.c 2003-11-15 00:33:36.000000000 -0300
|
||||
|
@@ -0,0 +1,20 @@
|
||||
|
+#define _GNU_SOURCE
|
||||
|
+#include <stdarg.h>
|
||||
|
+#include <sys/types.h>
|
||||
|
+#include <stdlib.h>
|
||||
|
+#include <stdio.h>
|
||||
|
+#include "dietwarning.h"
|
||||
|
+
|
||||
|
+int vasprintf(char **s, const char *format, va_list ap)
|
||||
|
+{
|
||||
|
+ int n;
|
||||
|
+ va_list arg_ptr;
|
||||
|
+ va_copy(arg_ptr,ap);
|
||||
|
+ n=vsnprintf(0,1000000,format,arg_ptr);
|
||||
|
+ va_end(arg_ptr);
|
||||
|
+ if ((*s=malloc(n+1))) {
|
||||
|
+ n=vsnprintf(*s,n+1,format,ap);
|
||||
|
+ return n;
|
||||
|
+ }
|
||||
|
+ return -1;
|
||||
|
+}
|
||||
@ -1,100 +0,0 @@ |
|||||
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|
||||
# |
|
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
||||
# Please add additional copyright information _after_ the line containing |
|
||||
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|
||||
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|
||||
# |
|
||||
# ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_module-init-tools.patch |
|
||||
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
|
||||
# |
|
||||
# This program is free software; you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU General Public License as published by |
|
||||
# the Free Software Foundation; either version 2 of the License, or |
|
||||
# (at your option) any later version. A copy of the GNU General Public |
|
||||
# License can be found at Documentation/COPYING. |
|
||||
# |
|
||||
# Many people helped and are helping developing ROCK Linux. Please |
|
||||
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|
||||
# file for details. |
|
||||
# |
|
||||
# --- ROCK-COPYRIGHT-NOTE-END --- |
|
||||
|
|
||||
--- ./insmod.c.orig 2003-04-06 12:21:21.000000000 +0200
|
|
||||
+++ ./insmod.c 2003-04-06 12:21:23.000000000 +0200
|
|
||||
@@ -53,6 +53,8 @@
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
+static inline _syscall3(long int,init_module,void*,map,unsigned long,len,char*,options);
|
|
||||
+
|
|
||||
int main(int argc, char *argv[]) |
|
||||
{ |
|
||||
unsigned int i; |
|
||||
@@ -108,7 +110,7 @@
|
|
||||
exit(1); |
|
||||
} |
|
||||
|
|
||||
- ret = syscall(__NR_init_module, map, len, options);
|
|
||||
+ ret = init_module(map, len, options);
|
|
||||
if (ret != 0) { |
|
||||
fprintf(stderr, "Error inserting '%s': %li %s\n", |
|
||||
filename, ret, moderror(errno)); |
|
||||
--- ./rmmod.c.orig 2003-04-06 12:26:27.000000000 +0200
|
|
||||
+++ ./rmmod.c 2003-04-06 12:25:30.000000000 +0200
|
|
||||
@@ -168,6 +168,8 @@
|
|
||||
modname[i] = '\0'; |
|
||||
} |
|
||||
|
|
||||
+static inline _syscall2(long int,delete_module,char*,name,int,flags);
|
|
||||
+
|
|
||||
static void rmmod(int log, int verbose, const char *path, int flags) |
|
||||
{ |
|
||||
long ret; |
|
||||
@@ -184,7 +186,7 @@
|
|
||||
(flags & O_NONBLOCK) ? "no" : "yes", |
|
||||
(flags & O_TRUNC) ? " force" : ""); |
|
||||
|
|
||||
- ret = syscall(__NR_delete_module, name, flags);
|
|
||||
+ ret = delete_module(name, flags);
|
|
||||
if (ret != 0) |
|
||||
error(log, "Removing '%s': %s\n", name, strerror(errno)); |
|
||||
} |
|
||||
--- ./modprobe.c.orig 2003-04-06 12:24:37.000000000 +0200
|
|
||||
+++ ./modprobe.c 2003-04-06 12:25:46.000000000 +0200
|
|
||||
@@ -672,6 +672,8 @@
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
+static inline _syscall3(long int,init_module,void*,map,unsigned long,len,char*,options);
|
|
||||
+
|
|
||||
/* Actually do the insert. Frees second arg. */ |
|
||||
static void insmod(struct list_head *list, |
|
||||
char *optstring, |
|
||||
@@ -754,7 +756,7 @@
|
|
||||
if (dry_run) |
|
||||
goto out; |
|
||||
|
|
||||
- ret = syscall(__NR_init_module, map, st.st_size, optstring);
|
|
||||
+ ret = init_module(map, st.st_size, optstring);
|
|
||||
if (ret != 0) { |
|
||||
if (dont_fail) |
|
||||
fatal("Error inserting %s (%s): %s\n", |
|
||||
@@ -771,6 +773,8 @@
|
|
||||
free(optstring); |
|
||||
} |
|
||||
|
|
||||
+static inline _syscall2(long int,delete_module,char*,name,int,flags);
|
|
||||
+
|
|
||||
/* Do recursive removal. */ |
|
||||
static void rmmod(struct list_head *list, |
|
||||
int dont_fail, |
|
||||
@@ -810,7 +814,7 @@
|
|
||||
if (dry_run) |
|
||||
goto remove_rest; |
|
||||
|
|
||||
- if (syscall(__NR_delete_module, mod->modname, O_EXCL) != 0) {
|
|
||||
+ if (delete_module(mod->modname, O_EXCL) != 0) {
|
|
||||
if (dont_fail) |
|
||||
fatal("Error removing %s (%s): %s\n", |
|
||||
mod->modname, mod->filename, |
|
||||