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: Dave 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:
Clone Of:
Environment:
Last Closed: 2007-04-11 16:34:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to fix the off-by-one (1.01 KB, patch)
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 Dave 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.