src/shared/dissect-image.c: fix build without blkdid (#16901)
N_DEVICE_NODE_LIST_ATTEMPTS is unconditionally used since version 246 and
ac1f3ad05f
However, this variable is only defined if HAVE_BLKID is set resulting in
the following build failure if cryptsetup is enabled but not libblkid:
../src/shared/dissect-image.c:1336:34: error: 'N_DEVICE_NODE_LIST_ATTEMPTS' undeclared (first use in this function)
1336 | for (unsigned i = 0; i < N_DEVICE_NODE_LIST_ATTEMPTS; i++) {
|
Fixes:
- http://autobuild.buildroot.org/results/67782c225c08387c1bbcbea9eee3ca12bc6577cd
This commit is contained in:
parent
9654645b62
commit
28e2641a1a
|
@ -54,6 +54,9 @@
|
|||
#include "user-util.h"
|
||||
#include "xattr-util.h"
|
||||
|
||||
/* how many times to wait for the device nodes to appear */
|
||||
#define N_DEVICE_NODE_LIST_ATTEMPTS 10
|
||||
|
||||
int probe_filesystem(const char *node, char **ret_fstype) {
|
||||
/* Try to find device content type and return it in *ret_fstype. If nothing is found,
|
||||
* 0/NULL will be returned. -EUCLEAN will be returned for ambiguous results, and an
|
||||
|
@ -154,9 +157,6 @@ static int enumerator_for_parent(sd_device *d, sd_device_enumerator **ret) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* how many times to wait for the device nodes to appear */
|
||||
#define N_DEVICE_NODE_LIST_ATTEMPTS 10
|
||||
|
||||
static int wait_for_partitions_to_appear(
|
||||
int fd,
|
||||
sd_device *d,
|
||||
|
|
Loading…
Reference in New Issue