diff options
author | Tom Gundersen <teg@jklm.no> | 2013-03-27 09:25:33 -0400 |
---|---|---|
committer | Ian Stakenvicius <axs@gentoo.org> | 2013-04-02 13:54:36 -0400 |
commit | f3ea87f611a02618a59c1e30989718da6ff31970 (patch) | |
tree | ff11df69864664dcc272d47fb0ab09e48753c879 /src | |
parent | 07403f07070124ec32dce1e3661a8b2235bad002 (diff) |
udev: make firmware loading optional and disable by default
Distros that whish to support old kernels should set
--with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
to retain the old behaviour.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/udev/Makefile.am | 5 | ||||
-rw-r--r-- | src/udev/udev-builtin.c | 2 | ||||
-rw-r--r-- | src/udev/udev.h | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am index 038803454f..d88d72bc6b 100644 --- a/src/udev/Makefile.am +++ b/src/udev/Makefile.am @@ -57,6 +57,11 @@ libudev_core_la_SOURCES = \ label.c \ mkdir.c +if ENABLE_FIRMWARE +libudev_core_la_SOURCES += \ + udev-builtin-firmware.c +endif + noinst_HEADERS = \ dev-setup.h \ label.h \ diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index b9dbe87dcc..d17534e1e0 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -34,7 +34,9 @@ static const struct udev_builtin *builtins[] = { [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, #endif [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, +#ifdef ENABLE_FIRMWARE [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware, +#endif [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id, #ifdef HAVE_MODULES diff --git a/src/udev/udev.h b/src/udev/udev.h index 682e03721f..5418261b55 100644 --- a/src/udev/udev.h +++ b/src/udev/udev.h @@ -140,7 +140,9 @@ enum udev_builtin_cmd { UDEV_BUILTIN_BLKID, #endif UDEV_BUILTIN_BTRFS, +#ifdef ENABLE_FIRMWARE UDEV_BUILTIN_FIRMWARE, +#endif UDEV_BUILTIN_HWDB, UDEV_BUILTIN_INPUT_ID, #ifdef HAVE_MODULES @@ -164,7 +166,9 @@ struct udev_builtin { extern const struct udev_builtin udev_builtin_blkid; #endif extern const struct udev_builtin udev_builtin_btrfs; +#ifdef ENABLE_FIRMWARE extern const struct udev_builtin udev_builtin_firmware; +#endif extern const struct udev_builtin udev_builtin_hwdb; extern const struct udev_builtin udev_builtin_input_id; #ifdef HAVE_MODULES |