GNU bug report logs - #20269
Disk size is written on STDERR if the disk label is unrecognised

Previous Next

Package: parted;

Reported by: Johan Oudinet <johan.oudinet <at> green-communications.fr>

Date: Tue, 7 Apr 2015 09:55:02 UTC

Severity: normal

To reply to this bug, email your comments to 20269 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#20269; Package parted. (Tue, 07 Apr 2015 09:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johan Oudinet <johan.oudinet <at> green-communications.fr>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Tue, 07 Apr 2015 09:55:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Johan Oudinet <johan.oudinet <at> green-communications.fr>
To: bug-parted <at> gnu.org
Subject: Disk size is written on STDERR if the disk label is unrecognised
Date: Tue, 07 Apr 2015 11:53:52 +0200
[Message part 1 (text/plain, inline)]
Hi,

$ sudo parted --script --machine /dev/sdd unit s print
Error: /dev/sdd: unrecognised disk label
BYT;
/dev/sdd:7744512s:scsi:512:512:unknown:Generic STORAGE DEVICE:;

The two last lines are printed in the standard error output instead of
the normal input. Because of that, I must redirect the standard error to
the standard output in order to read the disk size.
IMO, only the error message about the unrecognised disk label should be
printed on the standard error.

$ parted --version
parted (GNU parted) 3.2
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by
<http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.


Best regards,
-- 
Johan Oudinet
R&D Engineer - Green Communications
johan.oudinet <at> green-communications.fr

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-parted <at> gnu.org:
bug#20269; Package parted. (Tue, 07 Apr 2015 23:16:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: bug-parted <at> gnu.org
Subject: Re: bug#20269: Disk size is written on STDERR if the disk label is
 unrecognised
Date: Tue, 7 Apr 2015 16:15:13 -0700
On Tue, Apr 07, 2015 at 11:53:52AM +0200, Johan Oudinet wrote:
> Hi,
> 
> $ sudo parted --script --machine /dev/sdd unit s print
> Error: /dev/sdd: unrecognised disk label
> BYT;
> /dev/sdd:7744512s:scsi:512:512:unknown:Generic STORAGE DEVICE:;
> 
> The two last lines are printed in the standard error output instead of
> the normal input. Because of that, I must redirect the standard error to
> the standard output in order to read the disk size.
> IMO, only the error message about the unrecognised disk label should be
> printed on the standard error.

Are you sure? The code handling that is pretty straightforward:

https://github.com/bcl/parted/blob/master/parted/parted.c#L986

puts and printf, no stderr involved.


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)




This bug report was last modified 10 years and 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.