seunshare: always use translations when printing
PATCH 1/1 seunshare: always use translations when printing
Some errors previously were not using gettext for translations, hence wrap them with the _ macro.
Signed-off-by Rahul Sandhu <[email protected]>
--- sandbox/seunshare.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
sandbox/seunshare.c +7 -7
@@ -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;
Signature · 1 line
2.50.1
Quoted 5 lines · Rahul Sandhu
Some errors previously were not using gettext for translations, hence wrap them with the _ macro.
Signed-off-by Rahul Sandhu <[email protected]>
Obviously this will require updating the translation files.
Acked-by Stephen Smalley <[email protected]>
Quoted 69 lines
--- sandbox/seunshare.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)sandbox/seunshare.c +7
-8@@ -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
Stephen Smalley
maintainerQuoted 11 lines · Stephen Smalley
Quoted 5 lines · Rahul Sandhu
Some errors previously were not using gettext for translations, hence wrap them with the _ macro.
Signed-off-by Rahul Sandhu <[email protected]>Obviously this will require updating the translation files.
Acked-by Stephen Smalley <[email protected]>
Thanks, merged.