[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
- Re: Make mv work better with SELinux., Daniel J Walsh, 2012/11/08
- Re: Make mv work better with SELinux., Pádraig Brady, 2012/11/08
- Re: Make mv work better with SELinux., Pádraig Brady, 2012/11/27
- [PATCH 4/9] cp: -Z: s/fprintf/error/,
Pádraig Brady <=
- [PATCH 6/9] cp: -Z: add selinux.c to POTFILES.in, Pádraig Brady, 2012/11/27
- [PATCH 3/9] cp: -Z: spelling fixes, Pádraig Brady, 2012/11/27
- [PATCH 7/9] cp: -Z: remove redundant includes from selinux.[ch], Pádraig Brady, 2012/11/27
- [PATCH 5/9] cp: -Z: wrap/clarify/isolate --help messages, Pádraig Brady, 2012/11/27
- [PATCH 2/9] cp: -Z: formatting cleanups, Pádraig Brady, 2012/11/27
- [PATCH 8/9] cp: -Z: fix a logic error due to incorrect braces in mkfifo, Pádraig Brady, 2012/11/27
- [PATCH 1/9] cp: -Z: adjust utils to run restorecon with -Z, Pádraig Brady, 2012/11/27
- [PATCH 9/9] cp: -Z: adjust an existing selinux test to the new scheme, Pádraig Brady, 2012/11/27
- [PATCH] cp: -Z: fix memory leak edge case, Pádraig Brady, 2012/11/28
- Re: Make mv work better with SELinux., Jim Meyering, 2012/11/29