On 08/13/2013 12:09 PM, Ruben Kerkhof wrote:
> On Tue, Aug 13, 2013 at 1:16 PM, Daniel P. Berrange 
> <berra...@redhat.com>wrote:
> 
>> virReportSystemError(errno, _("Unable exec shell %s"), shargv[0]);
> 
> 
> s/Unable/Unable to/

Pushed the fix in your name, along with another line with the same
problem ("unable chdir(%s)", and wrapping some long lines:


From 11cdc424d30b15c6780d546a2f0d8ff93ce291b6 Mon Sep 17 00:00:00 2001
From: Ruben Kerkhof <ru...@rubenkerkhof.com>
Date: Tue, 13 Aug 2013 17:28:06 -0600
Subject: [PATCH] virt-login-shell: improve error message grammar

and wrap some long lines

Signed-off-by: Eric Blake <ebl...@redhat.com>
---
 tools/virt-login-shell.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c
index 1157cd0..c754ae4 100644
--- a/tools/virt-login-shell.c
+++ b/tools/virt-login-shell.c
@@ -76,7 +76,8 @@ static int virLoginShellAllowedUser(virConfPtr conf,
         /* Calc length and check items */
         for (pp = p->list; pp; pp = pp->next) {
             if (pp->type != VIR_CONF_STRING) {
-                virReportSystemError(EINVAL, "%s", _("shell must be a
list of strings"));
+                virReportSystemError(EINVAL, "%s",
+                                     _("shell must be a list of strings"));
                 goto cleanup;
             } else {
                 /*
@@ -105,7 +106,9 @@ static int virLoginShellAllowedUser(virConfPtr conf,
             }
         }
     }
-    virReportSystemError(EPERM, _("%s not matched against
'allowed_users' in %s"), name, conf_file);
+    virReportSystemError(EPERM,
+                         _("%s not matched against 'allowed_users' in %s"),
+                         name, conf_file);
 cleanup:
     VIR_FREE(gname);
     return ret;
@@ -128,7 +131,8 @@ static char **virLoginShellGetShellArgv(virConfPtr conf)
         /* Calc length and check items */
         for (len = 0, pp = p->list; pp; len++, pp = pp->next) {
             if (pp->type != VIR_CONF_STRING) {
-                virReportSystemError(EINVAL, "%s", _("shell must be a
list of strings"));
+                virReportSystemError(EINVAL, "%s",
+                                     _("shell must be a list of strings"));
                 goto error;
             }
         }
@@ -248,7 +252,8 @@ main(int argc, char **argv)
     }

     if (uid == 0) {
-        virReportSystemError(EPERM, _("%s must be run by non root
users"), progname);
+        virReportSystemError(EPERM, _("%s must be run by non root users"),
+                             progname);
         goto cleanup;
     }

@@ -340,11 +345,12 @@ main(int argc, char **argv)

         if (ccpid == 0) {
             if (chdir(homedir) < 0) {
-                virReportSystemError(errno, _("Unable chdir(%s)"),
homedir);
+                virReportSystemError(errno, _("Unable to chdir(%s)"),
homedir);
                 return EXIT_FAILURE;
             }
             if (execv(shargv[0], (char *const*) shargv) < 0) {
-                virReportSystemError(errno, _("Unable exec shell %s"),
shargv[0]);
+                virReportSystemError(errno, _("Unable to exec shell %s"),
+                                     shargv[0]);
                 return EXIT_FAILURE;
             }
         }
-- 
1.7.1



-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to