1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

Merge pull request #26192 from mrc0mmand/fix-errno-check

sysupdate: fix errno check
This commit is contained in:
Luca Boccassi 2023-01-25 19:48:23 +00:00 committed by GitHub
commit a4e05a6aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* Avoid running this transformation on the empty_to_null function itself */
position p : script:python() { p[0].current_element != "empty_to_null" };
/* Avoid running this transformation on the empty_to_null macro itself.
* See the note in strempty.cocci to understand the weird magic below.
*/
position p : script:python() {
not (p[0].file == "src/basic/string-util.h" and p[0].current_element == "something_else")
};
expression s;
@@

View File

@ -553,7 +553,7 @@ int resource_resolve_path(
r = stat("/run/systemd/volatile-root", &orig_root_stats);
if (r < 0) {
if (errno == -ENOENT) /* volatile-root not found */
if (errno == ENOENT) /* volatile-root not found */
r = get_block_device_harder("/usr/", &d);
else
return log_error_errno(r, "Failed to stat /run/systemd/volatile-root: %m");