Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sbin/ccdconfig



Module Name:    src
Committed By:   kre
Date:           Fri Feb 20 17:07:54 UTC 2026

Modified Files:
        src/sbin/ccdconfig: ccdconfig.c

Log Message:
Make the optional flags for ccdconfig truly optional.

The usage message, and the man page synopsis, has always
said:

        usage: ccdconfig [-cv] ccd ileave [flags] dev [...]

(plus the other variants not material here).   That is, the "flags"
can be omitted.

And they could, as implemented, but only when there are (not counting
the -c/-v options) exactly 3 args.

That is:

        ccdconfig ccd0 32 dev

would work, with dev being the (sole) device, rather than treated
as flags.   In any other case (like, more than one dev, which is
what makes ccd useful) the flags were not optional.

Correct that, so that we move from:

playground# ccdconfig ccd0 32 NAME=TST_SWAP_1 NAME=TST_SWAP_2
ccdconfig: invalid flags argument: NAME=TST_SWAP_1

to:

playground# ccdconfig ccd4 64 NAME=TST_SWAP_3 NAME=TST_SWAP_4 NAME=TST_SWAP_5
playground#

leading to:

playground# ccdconfig -g
ccd4            64      0x0     12884901888     /dev/dk14 /dev/dk15 /dev/dk16
ccd0            32      0x0     8589934592      /dev/dk12 /dev/dk13

The ccd0 config was done again (not shown) with the flags option supplied.

Since no-one has ever cared about this, no pullups planned.

(More changed to ccdconfig coming soon.)


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sbin/ccdconfig/ccdconfig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index