]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: reduce size of syscall-failed message
authorKarel Zak <kzak@redhat.com>
Tue, 28 Jan 2025 12:10:30 +0000 (13:10 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Feb 2025 11:34:41 +0000 (12:34 +0100)
The current version is too long.

OLD:
 mount: /mnt/test/fileA: mount_setattr system call failed: cannot set ID-mapping: Operation not permitted.

NEW:
 mount: /mnt/test/fileA: mount_setattr() failed: cannot set ID-mapping: Operation not permitted.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c

index f0b80f0b01ec62f7564419fdda09c9db807462b7..f2fa630f7a6c00c9ff4ea6bfaa601e049905bd52 100644 (file)
@@ -1664,7 +1664,7 @@ int mnt_context_get_mount_excode(
        if (buf && mnt_context_get_nmesgs(cxt, 'e')) {
                if (cxt->syscall_name) {
                        size_t len = snprintf(buf, bufsz,
-                                       _("%s system call failed: "),
+                                       _("%s() failed: "),
                                        cxt->syscall_name);
                        join_err_mesgs(cxt, buf + len, bufsz - len);
                } else
@@ -1839,7 +1839,7 @@ int mnt_context_get_mount_excode(
        generic_error:
                if (buf) {
                        errno = syserr;
-                       snprintf(buf, bufsz, _("%s system call failed: %m"),
+                       snprintf(buf, bufsz, _("%s() failed: %m"),
                                        cxt->syscall_name ? : "mount");
                }
                break;