summaryrefslogtreecommitdiffstats
path: root/src/partition
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-02-04 21:17:32 +0100
committerMike Yuan <me@yhndnzj.com>2024-02-06 08:09:28 +0100
commitb409aacb0aff9ced1a6f703f744bb4f0b6964b88 (patch)
tree720364066b394d577c7e93a45fc24ec70122e369 /src/partition
parentlogin/user-runtime-dir: properly check for mount point (diff)
downloadsystemd-b409aacb0aff9ced1a6f703f744bb4f0b6964b88.tar.xz
systemd-b409aacb0aff9ced1a6f703f744bb4f0b6964b88.zip
mountpoint-util: introduce path_is_mount_point_full
Diffstat (limited to 'src/partition')
-rw-r--r--src/partition/growfs.c2
-rw-r--r--src/partition/repart.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/partition/growfs.c b/src/partition/growfs.c
index 491040ffb0..f9600ace84 100644
--- a/src/partition/growfs.c
+++ b/src/partition/growfs.c
@@ -224,7 +224,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
- r = path_is_mount_point(arg_target, NULL, 0);
+ r = path_is_mount_point(arg_target);
if (r < 0)
return log_error_errno(r, "Failed to check if \"%s\" is a mount point: %m", arg_target);
if (r == 0)
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 2deada0718..05332f9680 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -5828,7 +5828,7 @@ static int find_backing_devno(
if (r < 0)
return r;
- r = path_is_mount_point(resolved, NULL, 0);
+ r = path_is_mount_point(resolved);
if (r < 0)
return r;
if (r == 0) /* Not a mount point, then it's not a partition of its own, let's not automatically use it. */
@@ -7037,7 +7037,7 @@ static int parse_argv(int argc, char *argv[]) {
/* By default operate on /sysusr/ or /sysroot/ when invoked in the initrd. We prefer the
* former, if it is mounted, so that we have deterministic behaviour on systems where /usr/
* is vendor-supplied but the root fs formatted on first boot. */
- r = path_is_mount_point("/sysusr/usr", NULL, 0);
+ r = path_is_mount_point("/sysusr/usr");
if (r <= 0) {
if (r < 0 && r != -ENOENT)
log_debug_errno(r, "Unable to determine whether /sysusr/usr is a mount point, assuming it is not: %m");