* [PATCH] seunshare: always use translations when printing
@ 2025-07-31 17:17 Rahul Sandhu
0 siblings, 0 replies; only message in thread
From: Rahul Sandhu @ 2025-07-31 17:17 UTC (permalink / raw)
To: selinux; +Cc: Rahul Sandhu
Some errors previously were not using gettext for translations, hence
wrap them with the _ macro.
Signed-off-by: Rahul Sandhu <nvraxn@gmail.com>
---
sandbox/seunshare.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sandbox/seunshare.c b/sandbox/seunshare.c
index 106f625f..97430535 100644
--- a/sandbox/seunshare.c
+++ b/sandbox/seunshare.c
@@ -103,7 +103,7 @@ static int set_signal_handles(void)
/* Empty the signal mask in case someone is blocking a signal */
if (sigemptyset(&empty)) {
- fprintf(stderr, "Unable to obtain empty signal set\n");
+ fprintf(stderr, _("Unable to obtain empty signal set\n"));
return -1;
}
@@ -111,12 +111,12 @@ static int set_signal_handles(void)
/* Terminate on SIGHUP */
if (signal(SIGHUP, SIG_DFL) == SIG_ERR) {
- perror("Unable to set SIGHUP handler");
+ perror(_("Unable to set SIGHUP handler"));
return -1;
}
if (signal(SIGINT, handler) == SIG_ERR) {
- perror("Unable to set SIGINT handler");
+ perror(_("Unable to set SIGINT handler"));
return -1;
}
@@ -353,7 +353,7 @@ static int rsynccmd(const char * src, const char *dst, char **cmdbuf)
/* match glob for all files in src dir */
if (asprintf(&buf, "%s/*", src) == -1) {
- fprintf(stderr, "Out of memory\n");
+ fprintf(stderr, _("Out of memory\n"));
return -1;
}
@@ -371,12 +371,12 @@ static int rsynccmd(const char * src, const char *dst, char **cmdbuf)
if (!buf) {
if (asprintf(&newbuf, "\'%s\'", path) == -1) {
- fprintf(stderr, "Out of memory\n");
+ fprintf(stderr, _("Out of memory\n"));
goto err;
}
} else {
if (asprintf(&newbuf, "%s \'%s\'", buf, path) == -1) {
- fprintf(stderr, "Out of memory\n");
+ fprintf(stderr, _("Out of memory\n"));
goto err;
}
}
@@ -387,7 +387,7 @@ static int rsynccmd(const char * src, const char *dst, char **cmdbuf)
if (buf) {
if (asprintf(&newbuf, "/usr/bin/rsync -trlHDq %s '%s'", buf, dst) == -1) {
- fprintf(stderr, "Out of memory\n");
+ fprintf(stderr, _("Out of memory\n"));
goto err;
}
*cmdbuf=newbuf;
--
2.50.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-31 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 17:17 [PATCH] seunshare: always use translations when printing Rahul Sandhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).