fs-util: rename xopenat() -> xopanat_full()
This commit is contained in:
@@ -673,9 +673,9 @@ int loop_device_make_by_path_at(
|
||||
direct_flags = FLAGS_SET(loop_flags, LO_FLAGS_DIRECT_IO) ? O_DIRECT : 0;
|
||||
rdwr_flags = open_flags >= 0 ? open_flags : O_RDWR;
|
||||
|
||||
fd = xopenat(dir_fd, path, basic_flags|direct_flags|rdwr_flags, /* xopen_flags = */ 0, /* mode = */ 0);
|
||||
fd = xopenat(dir_fd, path, basic_flags|direct_flags|rdwr_flags);
|
||||
if (fd < 0 && direct_flags != 0) /* If we had O_DIRECT on, and things failed with that, let's immediately try again without */
|
||||
fd = xopenat(dir_fd, path, basic_flags|rdwr_flags, /* xopen_flags = */ 0, /* mode = */ 0);
|
||||
fd = xopenat(dir_fd, path, basic_flags|rdwr_flags);
|
||||
else
|
||||
direct = direct_flags != 0;
|
||||
if (fd < 0) {
|
||||
@@ -685,9 +685,9 @@ int loop_device_make_by_path_at(
|
||||
if (open_flags >= 0 || !(ERRNO_IS_PRIVILEGE(r) || r == -EROFS))
|
||||
return r;
|
||||
|
||||
fd = xopenat(dir_fd, path, basic_flags|direct_flags|O_RDONLY, /* xopen_flags = */ 0, /* mode = */ 0);
|
||||
fd = xopenat(dir_fd, path, basic_flags|direct_flags|O_RDONLY);
|
||||
if (fd < 0 && direct_flags != 0) /* as above */
|
||||
fd = xopenat(dir_fd, path, basic_flags|O_RDONLY, /* xopen_flags = */ 0, /* mode = */ 0);
|
||||
fd = xopenat(dir_fd, path, basic_flags|O_RDONLY);
|
||||
else
|
||||
direct = direct_flags != 0;
|
||||
if (fd < 0)
|
||||
|
||||
Reference in New Issue
Block a user