mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
unit-file,portable: replace streq + basename with path_equal_filename
This commit is contained in:
parent
521a7c9bb9
commit
178a71d970
@ -699,7 +699,7 @@ static int add_names(
|
|||||||
|
|
||||||
if (inst_fragment &&
|
if (inst_fragment &&
|
||||||
fragment_basename &&
|
fragment_basename &&
|
||||||
!streq(basename(inst_fragment), fragment_basename)) {
|
!path_equal_filename(inst_fragment, fragment_basename)) {
|
||||||
log_debug("Instance %s has fragment %s and is not an alias of %s.",
|
log_debug("Instance %s has fragment %s and is not an alias of %s.",
|
||||||
inst, inst_fragment, unit_name);
|
inst, inst_fragment, unit_name);
|
||||||
continue;
|
continue;
|
||||||
|
@ -596,7 +596,7 @@ static int normalize_portable_changes(
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
for (size_t j = 0; j < n_changes_attached; ++j)
|
for (size_t j = 0; j < n_changes_attached; ++j)
|
||||||
if (streq(basename(changes_detached[i].path), basename(changes_attached[j].path))) {
|
if (path_equal_filename(changes_detached[i].path, changes_attached[j].path)) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user