Bug 235901 - parted is off by 1 byte when displaying disk size via 'print'
parted is off by 1 byte when displaying disk size via 'print'
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
rawhide
All Linux
medium Severity low
: ---
: ---
Assigned To: David Cantrell
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-10 14:14 EDT by Ryan McCabe
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-11 12:34:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to fix the off-by-one (1.01 KB, patch)
2007-04-10 14:14 EDT, Ryan McCabe
no flags Details | Diff

  None (edit)
Description Ryan McCabe 2007-04-10 14:14:51 EDT
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):

0.8.6-2

How reproducible:

100%

Actual results:

e.g.

(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
Fedora.
Comment 1 Ryan McCabe 2007-04-10 14:14:51 EDT
Created attachment 152168 [details]
patch to fix the off-by-one
Comment 2 David Cantrell 2007-04-11 12:34:22 EDT
Patch applied in parted-1.8.6-3.fc7.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.