]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/pidutils, lib/pidfd-utils: use _() instead of N_() in err() calls
authorKarel Zak <kzak@redhat.com>
Thu, 9 Apr 2026 13:08:30 +0000 (15:08 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 9 Apr 2026 13:08:30 +0000 (15:08 +0200)
N_() only marks a string for translation extraction but does not
translate at runtime. Use _() to ensure the error messages are
actually translated when displayed.

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/pidfd-utils.c
lib/pidutils.c

index a837359201821dff2b906194381b228dd1a4a926..aeda953c0d26024896b54451fa0aa339f6e30233 100644 (file)
@@ -41,7 +41,7 @@ uint64_t pidfd_get_inode(int pidfd)
        rc = statx(pidfd, "", AT_EMPTY_PATH, STATX_INO, &stx);
        if (rc < 0) {
                close(pidfd);
-               err(EXIT_FAILURE, N_("failed to statx() pidfd"));
+               err(EXIT_FAILURE, _("failed to statx() pidfd"));
        }
        return stx.stx_ino;
 }
@@ -72,7 +72,7 @@ int ul_get_valid_pidfd_or_err(pid_t pid, uint64_t pidfd_ino __attribute__((__unu
 
        pfd = ul_get_valid_pidfd(pid, pidfd_ino);
        if (pfd < 0)
-               err(EXIT_FAILURE, N_("failed to obtain a valid file descriptor for PID %d"), pid);
+               err(EXIT_FAILURE, _("failed to obtain a valid file descriptor for PID %d"), pid);
 
        return pfd;
 }
index f725f1292270bbe3ec7ea95d9a12bf7dba7f23cb..e4a5b22b4c154a7a796cc55a29922cf2407b1cc2 100644 (file)
@@ -85,7 +85,7 @@ int ul_parse_pid_str(char *pidstr, pid_t *pid_num, uint64_t *pfd_ino, int flags)
 void ul_parse_pid_str_or_err(char *pidstr, pid_t *pid_num, uint64_t *pfd_ino, int flags)
 {
        if (ul_parse_pid_str(pidstr, pid_num, pfd_ino, flags) < 0) {
-               err(EXIT_FAILURE, N_("failed to parse PID argument '%s'"), pidstr);
+               err(EXIT_FAILURE, _("failed to parse PID argument '%s'"), pidstr);
        }
 }