Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 182381

Summary: =sys-apps/hdparm-7.5 one dash (-) and two dash (--) command line parameters can't be used simultaneously
Product: Gentoo Linux Reporter: Yarda <zbox>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: VERIFIED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Yarda 2007-06-17 20:04:19 UTC
=sys-apps/hdparm-7.5 and also =sys-apps/hdparm-7.3 doesn't work with one dash (-) and two dash (--) parameters used simultaneously.

Example that fails with version 7.3 and 7.5 but works with 6.9-r1 and previous:

hdparm -d1 --security-freeze /dev/hda

This is problematic behavior when used such a combination in hdparm init script.

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2007-06-17 21:31:14 UTC
this is done on purpose in the code ...

handle_standalone_longarg (char *name)
{
    if (num_flags_processed) {
        if (verbose)
            fprintf(stderr, ...);
        usage_help(EINVAL);
    }

you cant use some long args after an action flag (-d is the action flag in this case)

if you still feel this is incorrect, please e-mail mlord@pobox.com about it
Comment 2 Yarda 2007-06-19 22:25:11 UTC
It is bug and due to reply from Mark Lord, it will be fixed in hdparm-7.6.