samples: build configfs sample on when enabled
PATCH 1/1 samples: build configfs sample on when enabled
Most samples have their own Kconfig option, but for some reason the configfs sample does not have one and gets built unconditionally when CONFIG_SAMPLES is enabled, which fails if CONFIG_CONFIGFS_FS is not:
ERROR: "configfs_unregister_subsystem" [samples/configfs/configfs_sample.ko] undefined!
ERROR: "configfs_register_subsystem" [samples/configfs/configfs_sample.ko] undefined!
This adds a new Kconfig symbol to mirror the existing method and only let the user enable this sample if configfs is present.
samples/Kconfig +6 -0
@@ -5,6 +5,12 @@ menuconfig SAMPLES if SAMPLES +config SAMPLE_CONFIGFS + tristate "Build configfs sample -- loadable modules only" + depends on CONFIGFS_FS && m + help + This builds the same for configfs + config SAMPLE_TRACE_EVENTS tristate "Build trace_events examples -- loadable modules only" depends on EVENT_TRACING && m
samples/configfs/Makefile +1 -2
@@ -1,2 +1 @@ - -obj-m += configfs_sample.o +obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs_sample.o
Quoted 5 lines · Arnd Bergmann
Most samples have their own
Kconfigoption, but for some reason the configfs sample does not have one and gets built unconditionally whenCONFIG_SAMPLESis enabled, which fails ifCONFIG_CONFIGFS_FSis not:
Quoted 7 lines
ERROR: "
configfs_unregister_subsystem" [samples/configfs/configfs_sample.ko] undefined!
ERROR: "configfs_register_subsystem" [samples/configfs/configfs_sample.ko] undefined!This adds a new
Kconfigsymbol to mirror the existing method and only let the user enable this sample if configfs is present.Signed-off-by Arnd Bergmann <[email protected]>
This should already be in version two of the series I sent last week.