aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

commit b4c9b934074f88394bb9c8f76ccb579b6277f773
parent 185be9c20d3f205f3e609d6155a7d34a99357775
Author: xplshn <anto@xplshn.com.ar>
Date:   Tue, 10 Nov 2026 21:54:20 -0300

Merge remote-tracking branch 'origin/master' into HEAD

Diffstat:
Mcmd/linux/modprobe.c | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/cmd/linux/modprobe.c b/cmd/linux/modprobe.c @@ -535,7 +535,7 @@ usage(void) #if FEATURE_MODPROBE_SYSLOG "s" #endif - "] " + "] [-S version] " #if FEATURE_MODPROBE_DIR_OVERRIDE "[-d dir] " #endif @@ -558,6 +558,7 @@ main(int argc, char *argv[]) struct utsname uts; struct StrNode *pn; char path[PATH_MAX]; + char *version = NULL; int i, ret = 0; ARGBEGIN @@ -583,6 +584,10 @@ main(int argc, char *argv[]) // ?man -l: List available modules matching the optional _pattern_ (a fnmatch(3) glob) lflag = 1; break; + case 'S': + // ?man -S:version: Use version instead of the running kernel release + version = EARGF(usage()); + break; #if FEATURE_MODPROBE_SHOW_DEPENDS case 'D': // ?man -D: Print the sequence of insmod commands that would be used to load the module, @@ -622,9 +627,12 @@ main(int argc, char *argv[]) #endif if (!moddirs) { - if (uname(&uts) < 0) - eprintf("uname:"); - snprintf(path, sizeof(path), "/lib/modules/%s", uts.release); + if (!version) { + if (uname(&uts) < 0) + eprintf("uname:"); + version = uts.release; + } + snprintf(path, sizeof(path), "/lib/modules/%s", version); strlist_append(&moddirs, path); }