[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] chcon: correct --verbose output to include newlines
From: |
Jim Meyering |
Subject: |
Re: [PATCH] chcon: correct --verbose output to include newlines |
Date: |
Mon, 16 Jun 2008 16:18:48 +0200 |
Jim Meyering <address@hidden> wrote:
> I've just made this change:
...
> Subject: [PATCH] chcon: correct --verbose output to include newlines
Actually I added a test and updated NEWS, too:
>From 3de15598304c141bdac5a3545874bab035536d88 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 16 Jun 2008 13:03:07 +0200
Subject: [PATCH] chcon: correct --verbose output to include newlines
* src/chcon.c (process_file): Append "\n" to --verbose diagnostic.
* tests/misc/chcon: Add a test for the above.
* NEWS: mention the bug fix
Reported by Carl D. Roth in http://bugzilla.redhat.com/451478.
---
NEWS | 2 ++
src/chcon.c | 2 +-
tests/misc/chcon | 4 ++++
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/NEWS b/NEWS
index 3f2a8db..fe33814 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ GNU coreutils NEWS -*-
outline -*-
** Bug fixes
+ chcon --verbose now prints a newline after each message
+
od no longer suffers from platform bugs in printf(3). This is
probably most noticeable when using 'od -tfL' to print long doubles.
diff --git a/src/chcon.c b/src/chcon.c
index a043413..b271ce4 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -300,7 +300,7 @@ process_file (FTS *fts, FTSENT *ent)
if (ok)
{
if (verbose)
- printf (_("changing security context of %s"),
+ printf (_("changing security context of %s\n"),
quote (file_full_name));
if (change_file_context (fts->fts_cwd_fd, file) != 0)
diff --git a/tests/misc/chcon b/tests/misc/chcon
index f8caada..fefe0ec 100755
--- a/tests/misc/chcon
+++ b/tests/misc/chcon
@@ -60,4 +60,8 @@ EOF
compare out exp || fail=1
+chcon --verbose -u$u1 f > out || fail=1
+echo 'changing security context of `f'\' > exp
+compare out exp || fail=1
+
(exit $fail); exit $fail
--
1.5.6.rc3.9.gac038