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 - parted is off by 1 byte when displaying disk size via 'print'
Summary: parted is off by 1 byte when displaying disk size via 'print'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: parted
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-10 18:14 UTC by Ryan McCabe
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-11 16:34:22 UTC


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

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):

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 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.


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