]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
enosys: translate messages
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 28 Apr 2023 07:56:31 +0000 (09:56 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 16 May 2023 20:44:50 +0000 (22:44 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/enosys.c

index 793b646463ed3789c7548bb1df60e50629c38977..ab81e87f63c495f0b3d12d418b65d72cfdf7cd9e 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "c.h"
 #include "exitcodes.h"
+#include "nls.h"
 
 #if __x86_64__
 #    define SECCOMP_ARCH_NATIVE AUDIT_ARCH_X86_64
@@ -117,7 +118,7 @@ int main(int argc, char **argv)
                                }
                        }
                        if (!found)
-                               errx(EXIT_FAILURE, "Unknown syscall '%s'", optarg);
+                               errx(EXIT_FAILURE, _("Unknown syscall '%s'"), optarg);
                        break;
                case 'V':
                        print_version(EXIT_SUCCESS);
@@ -160,14 +161,14 @@ int main(int argc, char **argv)
         * seccomp is not supported. To distinguish those cases do a *GET* here
         */
        if (prctl(PR_GET_SECCOMP) == -1 && errno == EINVAL)
-               err(EXIT_NOTSUPP, "Seccomp non-functional");
+               err(EXIT_NOTSUPP, _("Seccomp non-functional"));
 
        if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0))
-               err_nosys(EXIT_FAILURE, "prctl(PR_SET_NO_NEW_PRIVS)");
+               err_nosys(EXIT_FAILURE, _("prctl(PR_SET_NO_NEW_PRIVS)"));
 
        if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog))
-               err_nosys(EXIT_FAILURE, "prctl(PR_SET_SECCOMP)");
+               err_nosys(EXIT_FAILURE, _("prctl(PR_SET_SECCOMP)"));
 
        if (execvp(argv[optind], argv + optind))
-               err(EXIT_NOTSUPP, "Could not exec");
+               err(EXIT_NOTSUPP, _("Could not exec"));
 }