Bug 115052

Summary: make "sfdisk -V" and "sfdsik -V -L" (slightly) more useful
Product: [Fedora] Fedora Reporter: Paul Bolle <pebolle>
Component: util-linuxAssignee: Elliot Lee <sopwith>
Status: CLOSED UPSTREAM QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 1Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-24 15:30:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to sfdisk none

Description Paul Bolle 2004-02-05 22:26:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Description of problem:
The output of "sfdisk -V" and "sfdisk -V -L" are slightly confusing.
The "-L" option should "not complain about things irrelevant for
Linux" but still does so with the checks concerning the start and end
of partitions and cylinder boiundaries. 

Version-Release number of selected component (if applicable):
util-linux-2.11y-29

How reproducible:
Always

Steps to Reproduce:
1. run either "sfdisk -V" of "sfdisk -V -L"
2.
3.
    

Additional info:
On a harddisk on my PC "sfdisk -V" will only generate:

Warning: partition 1 does not start at a cylinder boundary

(and return: 1).

"sfdisk -V -L" will generate:

Warning: partition 1 does not start at a cylinder boundary
Warning: partition [6] does not start at a cylinder boundary
Warning: partition [6] does not end at a cylinder boundary
Warning: partition 6 does not end at a cylinder boundary
Warning: partition [7] does not start at a cylinder boundary
Warning: partition [7] does not end at a cylinder boundary
Warning: partition 7 does not end at a cylinder boundary
Warning: partition [8] does not start at a cylinder boundary
/dev/hda: OK

(and return 0). 

These results are, altough correct, not entirely what one would
expect. I have written a small patch that reverses output for "sfdisk
-V" to:

Warning: partition 1 does not start at a cylinder boundary
Warning: partition [6] does not start at a cylinder boundary
Warning: partition [6] does not end at a cylinder boundary
Warning: partition 6 does not end at a cylinder boundary
Warning: partition [7] does not start at a cylinder boundary
Warning: partition [7] does not end at a cylinder boundary
Warning: partition 7 does not end at a cylinder boundary
Warning: partition [8] does not start at a cylinder boundary

and for "sfdisk -V -L" to only:

/dev/hda: OK

I'll try to attach my patch.

Comment 1 Paul Bolle 2004-02-05 22:34:40 UTC
Created attachment 97504 [details]
patch to sfdisk

I have some further questions:
- do I need to discuss patches such as this one on "fedora-devel-list" BEFORE
or AFTER filing a bug or isn't that necessary?
- should I try to contact someone "upstream" (aeb?)

By the way, I'm not much of a hacker, so I really won't mind comments regarding
my coding ...

Comment 2 Elliot Lee 2004-02-24 15:30:40 UTC
You should try contacting upstream to find out what is really intended
in sfdisk. The code doesn't make it clear what the right behaviour is.

The code looks good, although submitting a patch that contain "FIXME"
probably doesn't increase the chances of it being accepted. :)

I'll close this as an UPSTREAM resolution for now - definitely reopen
it if anything happens that needs attention from Red Hat.