]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
setpriv: small clean-up.
authorÉrico Rolim <erico.erc@gmail.com>
Fri, 20 Nov 2020 15:33:23 +0000 (12:33 -0300)
committerKarel Zak <kzak@redhat.com>
Wed, 10 Feb 2021 08:38:48 +0000 (09:38 +0100)
- Add _() calls for some strings which were missing it.
- In print_caps(), use the same error checking done in
  list_known_caps(); it is expected that libcap-ng will always return a
  string, even if it's only "cap_%d".

sys-utils/setpriv.c

index 4ac46db82b54468b57b765046d32d8160bb377d4..ddc2cc6afea6ffc7e5c7b52c7f1247a460291e40 100644 (file)
@@ -190,10 +190,7 @@ static int print_caps(FILE *f, enum cap_type which)
                        if (name)
                                fputs(name, f);
                        else
-                               /* cap-ng has very poor handling of
-                                * CAP_LAST_CAP changes.  This is the
-                                * best we can do. */
-                               printf("cap_%d", i);
+                               warnx(_("cap %d: libcap-ng is broken"), i);
                        n++;
                }
        }
@@ -321,13 +318,13 @@ static void dump_pdeathsig(void)
                return;
        }
 
-       printf("Parent death signal: ");
+       printf(_("Parent death signal: "));
        if (pdeathsig && signum_to_signame(pdeathsig) != NULL)
                printf("%s\n", signum_to_signame(pdeathsig));
        else if (pdeathsig)
                printf("%d\n", pdeathsig);
        else
-               printf("[none]\n");
+               printf(_("[none]\n"));
 }
 
 static void dump(int dumplevel)