summaryrefslogtreecommitdiffstats
path: root/loader2/modstubs.c
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2007-08-14 19:23:41 +0000
committerDavid Cantrell <dcantrell@redhat.com>2007-08-14 19:23:41 +0000
commitcc0493599ab7572c4a667772649aae1ab6df187a (patch)
treee899463fee62d6dc71ff71683b3dccd73eba1fb0 /loader2/modstubs.c
parent8dc6721766ee00d26adc16c308a0e1a07a4a5695 (diff)
downloadanaconda-cc0493599ab7572c4a667772649aae1ab6df187a.tar.gz
anaconda-cc0493599ab7572c4a667772649aae1ab6df187a.tar.xz
anaconda-cc0493599ab7572c4a667772649aae1ab6df187a.zip
* iw/netconfig_dialog.py: Patch from hhara AT miraclelinux DOT com
to fix some input validation errors and error reporting. * loader2/modstubs.c (ourInsmodCommand): Handle more than one module parameter in insmod (hhara AT miraclelinux DOT com).
Diffstat (limited to 'loader2/modstubs.c')
-rw-r--r--loader2/modstubs.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/loader2/modstubs.c b/loader2/modstubs.c
index 86ef12d1b..5bf0e2c8f 100644
--- a/loader2/modstubs.c
+++ b/loader2/modstubs.c
@@ -88,6 +88,8 @@ int ourInsmodCommand(int argc, char ** argv) {
int fd;
void * modbuf = NULL;
struct stat sb;
+ int i;
+ char *options = strdup("");
if (argc < 2) {
return usage();
@@ -138,12 +140,14 @@ int ourInsmodCommand(int argc, char ** argv) {
return 1;
}
- if (argc > 2) {
- /* FIXME: only allows one param */
- rc = init_module(modbuf, sb.st_size, argv[2]);
- } else {
- rc = init_module(modbuf, sb.st_size, "");
- }
+ for (i = 2; i < argc; i++) {
+ options = realloc(options,
+ strlen(options) + 1 + strlen(argv[i]) + 1);
+ strcat(options, argv[i]);
+ strcat(options, " ");
+ }
+
+ rc = init_module(modbuf, sb.st_size, options);
if (rc != 0)
logMessage(WARNING, "failed to insert module (%d)", errno);
return rc;