mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
repart: open the populated tree via xopenat()
The manifest generation from f4bff983b2 ("repart: optionally write
UAPI.16 manifests of populated partitions and of the partition table")
was merged after the move to the xopenat() family. It opens the populated
tree with a direct open() call. Let's use xopenat() like the rest of
repart.
This commit is contained in:
1 parent
2aa12e42f8
commit
82947017bf
1 file changed
+2
-2
+2
-2
@@ -7601,9 +7601,9 @@ static int partition_manifest_write(Context *context, Partition *p, const char *
|
||||
|
||||
log_info("Generating manifest of %s filesystem.", p->format);
|
||||
|
||||
_cleanup_close_ int dir_fd = open(root, O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
|
||||
_cleanup_close_ int dir_fd = xopenat(AT_FDCWD, root, O_DIRECTORY|O_NOFOLLOW);
|
||||
if (dir_fd < 0)
|
||||
return log_error_errno(errno, "Failed to open populated tree '%s': %m", root);
|
||||
return log_error_errno(dir_fd, "Failed to open populated tree '%s': %m", root);
|
||||
|
||||
_cleanup_close_ int dup_fd = fcntl(p->manifest_fd, F_DUPFD_CLOEXEC, 3);
|
||||
if (dup_fd < 0)
|
||||
|
||||
Reference in new issue
Block a user