coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/9] cp: -Z: s/fprintf/error/


From: Pádraig Brady
Subject: [PATCH 4/9] cp: -Z: s/fprintf/error/
Date: Wed, 28 Nov 2012 01:43:14 +0000

change 2 cases
---
 src/cp.c      |    8 ++------
 src/install.c |    8 ++------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/cp.c b/src/cp.c
index 77d04e6..cddef7c 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -1107,12 +1107,8 @@ main (int argc, char **argv)
                   /* if there's a security_context given set new path
                      components to that context, too.  */
                   if (setfscreatecon (optarg) < 0)
-                    {
-                      fprintf (stderr,
-                               _("cannot set default security context %s\n"),
-                               optarg);
-                      exit (1);
-                    }
+                    error (EXIT_FAILURE, 0,
+                           _("cannot set default security context %s"), 
optarg);
                 }
                 x.set_security_context = true;
                 x.preserve_security_context = false;
diff --git a/src/install.c b/src/install.c
index ed870f2..2c1ca34 100644
--- a/src/install.c
+++ b/src/install.c
@@ -861,12 +861,8 @@ main (int argc, char **argv)
               break;
             }
           if (x.set_security_context || scontext)
-            {
-              fprintf (stderr,
-                       "%s: cannot force target context and preserve it\n",
-                       argv[0]);
-              exit (1);
-            }
+            error (EXIT_FAILURE, 0,
+                   _("cannot force target context and preserve it"));
           x.preserve_security_context = true;
           break;
         case 'Z':
-- 
1.7.6.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]