rmmod -a removed modules recursively
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ LIBBB_SRC:= \
|
||||
my_getpwnam.c my_getpwnamegid.c my_getpwuid.c obscure.c parse_mode.c \
|
||||
parse_number.c perror_msg.c perror_msg_and_die.c print_file.c \
|
||||
process_escape_sequence.c procps.c pwd2spwd.c pw_encrypt.c \
|
||||
read_package_field.c recursive_action.c remove_file.c \
|
||||
qmodule.c read_package_field.c recursive_action.c remove_file.c \
|
||||
restricted_shell.c run_parts.c run_shell.c safe_read.c safe_strncpy.c \
|
||||
setup_environment.c simplify_path.c syscalls.c syslog_msg_with_name.c \
|
||||
time_string.c trim.c u_signal_names.c vdprintf.c verror_msg.c \
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright (C) 2002 Tim Riker <Tim@Rikers.org>
|
||||
everyone seems to claim it someplace. ;-)
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret);
|
||||
|
||||
int my_query_module(const char *name, int which, void **buf,
|
||||
size_t *bufsize, size_t *ret)
|
||||
{
|
||||
int my_ret;
|
||||
|
||||
my_ret = query_module(name, which, *buf, *bufsize, ret);
|
||||
|
||||
if (my_ret == -1 && errno == ENOSPC) {
|
||||
*buf = xrealloc(*buf, *ret);
|
||||
*bufsize = *ret;
|
||||
|
||||
my_ret = query_module(name, which, *buf, *bufsize, ret);
|
||||
}
|
||||
|
||||
return my_ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user