mirror of
https://github.com/systemd/systemd
synced 2025-10-05 19:54:46 +02:00
Compare commits
No commits in common. "e39288193fcdf3a36dbc49b78e6c9bf86a764e31" and "f9b3afae96c72564cd4cd766555845f17e3c12a9" have entirely different histories.
e39288193f
...
f9b3afae96
@ -94,8 +94,7 @@ int block_get_originating(dev_t dt, dev_t *ret) {
|
|||||||
_cleanup_closedir_ DIR *d = NULL;
|
_cleanup_closedir_ DIR *d = NULL;
|
||||||
_cleanup_free_ char *t = NULL;
|
_cleanup_free_ char *t = NULL;
|
||||||
char p[SYS_BLOCK_PATH_MAX("/slaves")];
|
char p[SYS_BLOCK_PATH_MAX("/slaves")];
|
||||||
_cleanup_free_ char *first_found = NULL;
|
struct dirent *de, *found = NULL;
|
||||||
struct dirent *de;
|
|
||||||
const char *q;
|
const char *q;
|
||||||
dev_t devt;
|
dev_t devt;
|
||||||
int r;
|
int r;
|
||||||
@ -116,22 +115,20 @@ int block_get_originating(dev_t dt, dev_t *ret) {
|
|||||||
if (!IN_SET(de->d_type, DT_LNK, DT_UNKNOWN))
|
if (!IN_SET(de->d_type, DT_LNK, DT_UNKNOWN))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (first_found) {
|
if (found) {
|
||||||
_cleanup_free_ char *u = NULL, *v = NULL, *a = NULL, *b = NULL;
|
_cleanup_free_ char *u = NULL, *v = NULL, *a = NULL, *b = NULL;
|
||||||
|
|
||||||
/* We found a device backed by multiple other devices. We don't really support
|
/* We found a device backed by multiple other devices. We don't really support automatic
|
||||||
* automatic discovery on such setups, with the exception of dm-verity partitions. In
|
* discovery on such setups, with the exception of dm-verity partitions. In this case there are
|
||||||
* this case there are two backing devices: the data partition and the hash
|
* two backing devices: the data partition and the hash partition. We are fine with such
|
||||||
* partition. We are fine with such setups, however, only if both partitions are on
|
* setups, however, only if both partitions are on the same physical device. Hence, let's
|
||||||
* the same physical device. Hence, let's verify this by iterating over every node
|
* verify this. */
|
||||||
* in the 'slaves/' directory and comparing them with the first that gets returned by
|
|
||||||
* readdir(), to ensure they all point to the same device. */
|
|
||||||
|
|
||||||
u = path_join(p, de->d_name, "../dev");
|
u = path_join(p, de->d_name, "../dev");
|
||||||
if (!u)
|
if (!u)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
v = path_join(p, first_found, "../dev");
|
v = path_join(p, found->d_name, "../dev");
|
||||||
if (!v)
|
if (!v)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@ -147,17 +144,15 @@ int block_get_originating(dev_t dt, dev_t *ret) {
|
|||||||
* different physical devices, and we don't support that. */
|
* different physical devices, and we don't support that. */
|
||||||
if (!streq(a, b))
|
if (!streq(a, b))
|
||||||
return -ENOTUNIQ;
|
return -ENOTUNIQ;
|
||||||
} else {
|
|
||||||
first_found = strdup(de->d_name);
|
|
||||||
if (!first_found)
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
found = de;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!first_found)
|
if (!found)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
q = strjoina(p, "/", first_found, "/dev");
|
q = strjoina(p, "/", found->d_name, "/dev");
|
||||||
|
|
||||||
r = read_one_line_file(q, &t);
|
r = read_one_line_file(q, &t);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
@ -45,17 +45,10 @@ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
|
|||||||
if efi_cc.length() == 0
|
if efi_cc.length() == 0
|
||||||
efi_cc = cc.cmd_array()
|
efi_cc = cc.cmd_array()
|
||||||
endif
|
endif
|
||||||
efi_ld = get_option('efi-ld').to_lower()
|
efi_ld = get_option('efi-ld')
|
||||||
if efi_ld == ''
|
if efi_ld == ''
|
||||||
efi_ld = find_program('ld', required: true)
|
efi_ld = find_program('ld', required: true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if efi_ld == 'lld' or efi_ld == 'ld.lld'
|
|
||||||
# LLVM/LLD does not support PE/COFF relocations
|
|
||||||
# https://lists.llvm.org/pipermail/llvm-dev/2021-March/149234.html
|
|
||||||
error('LLVM/lld does not support PE/COFF relocations. Use different linker for EFI image.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
efi_incdir = get_option('efi-includedir')
|
efi_incdir = get_option('efi-includedir')
|
||||||
|
|
||||||
gnu_efi_path_arch = ''
|
gnu_efi_path_arch = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user