FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 07-28-2010, 03:41 PM
"Brian C. Lane"
 
Default Redirect uncpio errors to syslog (#618181)

Resolves: rhbz#618181
Related: rhbz#588671
---
pyanaconda/isys/uncpio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/isys/uncpio.c b/pyanaconda/isys/uncpio.c
index 171eb6b..2e686a3 100644
--- a/pyanaconda/isys/uncpio.c
+++ b/pyanaconda/isys/uncpio.c
@@ -39,6 +39,7 @@

#include "cpio.h"
#include "stubs.h"
+#include "log.h"

#if MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
@@ -504,7 +505,7 @@ int myCpioInstallArchive(gzFile stream, struct cpioFileMapping * mappings,

do {
if ((rc = getNextHeader(&fd, &ch, NULL))) {
- fprintf(stderr, _("error %d reading header: %s
"), rc,
+ logMessage( WARNING, _("error %d reading header: %s
"), rc,
myCpioStrerror(rc));
return CPIOERR_BAD_HEADER;
}
@@ -755,7 +756,7 @@ int myCpioFilterArchive(gzFile inStream, gzFile outStream, char ** patterns) {

do {
if ((rc = getNextHeader(&inFd, &ch, &pHeader))) {
- fprintf(stderr, _("error %d reading header: %s
"), rc,
+ logMessage( WARNING, _("error %d reading header: %s
"), rc,
myCpioStrerror(rc));
return CPIOERR_BAD_HEADER;
}
--
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 07-28-2010, 03:51 PM
Chris Lumens
 
Default Redirect uncpio errors to syslog (#618181)

> @@ -504,7 +505,7 @@ int myCpioInstallArchive(gzFile stream, struct cpioFileMapping * mappings,
>
> do {
> if ((rc = getNextHeader(&fd, &ch, NULL))) {
> - fprintf(stderr, _("error %d reading header: %s
"), rc,
> + logMessage( WARNING, _("error %d reading header: %s
"), rc,
> myCpioStrerror(rc));
> return CPIOERR_BAD_HEADER;
> }
> @@ -755,7 +756,7 @@ int myCpioFilterArchive(gzFile inStream, gzFile outStream, char ** patterns) {
>
> do {
> if ((rc = getNextHeader(&inFd, &ch, &pHeader))) {
> - fprintf(stderr, _("error %d reading header: %s
"), rc,
> + logMessage( WARNING, _("error %d reading header: %s
"), rc,
> myCpioStrerror(rc));
> return CPIOERR_BAD_HEADER;
> }

We typically do not translate messages sent to the log files, since we
are the primary users of the logs and it's more confusing for us.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 07-28-2010, 04:12 PM
"Brian C. Lane"
 
Default Redirect uncpio errors to syslog (#618181)

On 07/28/2010 08:51 AM, Chris Lumens wrote:

@@ -504,7 +505,7 @@ int myCpioInstallArchive(gzFile stream, struct cpioFileMapping * mappings,

do {
if ((rc = getNextHeader(&fd,&ch, NULL))) {
- fprintf(stderr, _("error %d reading header: %s
"), rc,
+ logMessage( WARNING, _("error %d reading header: %s
"), rc,
myCpioStrerror(rc));
return CPIOERR_BAD_HEADER;
}
@@ -755,7 +756,7 @@ int myCpioFilterArchive(gzFile inStream, gzFile outStream, char ** patterns) {

do {
if ((rc = getNextHeader(&inFd,&ch,&pHeader))) {
- fprintf(stderr, _("error %d reading header: %s
"), rc,
+ logMessage( WARNING, _("error %d reading header: %s
"), rc,
myCpioStrerror(rc));
return CPIOERR_BAD_HEADER;
}


We typically do not translate messages sent to the log files, since we
are the primary users of the logs and it's more confusing for us.


I just carried over what was already there (including ugly uses of
tabs). Should I convert that back to a plain old string? And if so,
myCpioStrerror() is also returning translations, should those be cleaned
up as well?


--
Brian C. Lane <bcl@redhat.com>
Red Hat / Port Orchard, WA

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 07-28-2010, 05:09 PM
Chris Lumens
 
Default Redirect uncpio errors to syslog (#618181)

> I just carried over what was already there (including ugly uses of
> tabs). Should I convert that back to a plain old string?

While you're in there, might as well clean it up.

> And if so,
> myCpioStrerror() is also returning translations, should those be
> cleaned up as well?

In general, if the string is logged then it shouldn't be translated and
if it's put into a dialog to be displayed to the user, it should be
translated.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org