Skip to content

Commit

Permalink
feat(install): add default value for --firmwaredirs
Browse files Browse the repository at this point in the history
If not specified, use /lib/firmware.
  • Loading branch information
marcosfrm authored and haraldh committed May 25, 2021
1 parent a277a5f commit 4cb086f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/install/dracut-install.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,9 @@ static void usage(int status)
"\n"
" --module,-m Install kernel modules, instead of files\n"
" --kerneldir Specify the kernel module directory\n"
" (default: /lib/modules/`uname -r`)\n"
" --firmwaredirs Specify the firmware directory search path with : separation\n"
" (default: DRACUT_FIRMWARE_PATH env var, /lib/firmware if not set)\n"
" --silent Don't display error messages for kernel module install\n"
" --modalias Only generate module list from /sys/devices modalias list\n"
" -o --optional If kernel module does not exist, do not fail\n"
Expand Down Expand Up @@ -1183,14 +1185,12 @@ static int parse_argv(int argc, char *argv[])

path = getenv("DRACUT_FIRMWARE_PATH");

if (path == NULL) {
log_error("Environment variable DRACUT_FIRMWARE_PATH is not set");
exit(EXIT_FAILURE);
if (path) {
log_debug("DRACUT_FIRMWARE_PATH=%s", path);
firmwaredirs = strv_split(path, ":");
} else {
firmwaredirs = strv_new("/lib/firmware", NULL);
}

log_debug("DRACUT_FIRMWARE_PATH=%s", path);

firmwaredirs = strv_split(path, ":");
}
}

Expand Down

0 comments on commit 4cb086f

Please sign in to comment.