Commit 1f74eb9
common/rc: add _have_kernel_options helper function
Add a new helper function _have_kernel_options() that accepts multiple
kernel config options as arguments. This allows tests to check for
multiple kernel options in a single call, making the requires()
function more concise.
Example usage:
requires() {
_have_kernel_options IO_URING BLK_DEV_INTEGRITY
}
Instead of:
requires() {
_have_kernel_option IO_URING
_have_kernel_option BLK_DEV_INTEGRITY
}
The function iterates through all provided options and returns failure
if any option is not enabled, maintaining the same error reporting
behavior as individual calls.
Signed-off-by: Chaitanya Kulkarni <[email protected]>
[Shin'ichiro: modified _have_kernel_options() to check all arguments]
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>1 parent 9f0b5f2 commit 1f74eb9
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
240 | 250 | | |
241 | 251 | | |
242 | 252 | | |
| |||
0 commit comments