Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:philipsb:newer-kernels-on-sle10
module-init-tools
module-init-tools-options-priority.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File module-init-tools-options-priority.diff of Package module-init-tools
--- modprobe.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) --- modprobe.c.orig +++ modprobe.c @@ -805,6 +805,20 @@ static char *append_option(char *options return options; } +static char *prepend_option(char *options, const char *newoption) +{ + size_t l1, l2; + l1 = strlen(options); + l2 = strlen(newoption); + /* the resulting string will look like + * newoption + ' ' + options + '\0' */ + options = NOFAIL(realloc(options, l2 + 1 + l1 + 1)); + memmove(options + l2 + 1, options, l1 + 1); + options[l2] = ' '; + memcpy(options, newoption, l2); + return options; +} + /* Add to options */ static char *add_extra_options(const char *modname, char *optstring, @@ -812,7 +826,7 @@ static char *add_extra_options(const cha { while (options) { if (strcmp(options->modulename, modname) == 0) - optstring = append_option(optstring, options->options); + optstring = prepend_option(optstring, options->options); options = options->next; } return optstring;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor