Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 235901

Summary: parted is off by 1 byte when displaying disk size via 'print'
Product: [Fedora] Fedora Reporter: Ryan McCabe <rmccabe>
Component: partedAssignee: David Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-11 16:34:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
patch to fix the off-by-one none

Description Ryan McCabe 2007-04-10 18:14:51 UTC
Description of problem:

When the default unit is bytes, in the results returned via the print command,
parted reports disks are one byte smaller than they actually are. If the default
unit is any other size, it ends up being rounded correctly, and the problem
doesn't occur at all when the default unit is cylinders or CHS.

Version-Release number of selected component (if applicable):


How reproducible:


Actual results:


(parted) unit B                                                           
(parted) print                                                            
Model: ATA HDS728080PLA380 (scsi)
Disk /dev/sda: 79999999999B

Expected results:

(parted) unit B                                                           
(parted) print                                                            
Model: ATA HDS728080PLA380 (scsi)
Disk /dev/sda: 80000000000B

Additional info:

The same bug is present in the version of parted in RHEL5 and older versions of

Comment 1 Ryan McCabe 2007-04-10 18:14:51 UTC
Created attachment 152168 [details]
patch to fix the off-by-one

Comment 2 David Cantrell 2007-04-11 16:34:22 UTC
Patch applied in parted-1.8.6-3.fc7.  Thanks.