NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59861: ccdconfig -g doesn't do as promised
>Number: 59861
>Category: bin
>Synopsis: ccdconfig -g doesn't do as promised
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 24 17:00:00 +0000 2025
>Originator: Robert Elz
>Release: NetBSD 11.99.4
>Organization:
>Environment:
System: NetBSD jacaranda.noi.kre.to 11.99.4 NetBSD 11.99.4 (JACARANDA:1.1-20251220) #234: Sat Dec 20 20:10:00 +07 2025 kre%jacaranda.noi.kre.to@localhost:/usr/obj/testing/kernels/amd64/JACARANDA amd64
Architecture: x86_64
Machine: amd64
>Description:
According to its manual page, ccdconfig -g [dev ...]
should:
Dump the current ccd configuration in a format suitable
for use as the ccd configuration file.
It doesn't.
jacaranda$ ccdconfig -g ccd0
ccd0 32 0x0 1651979124736 /dev/dk15 /dev/dk4
The config file format is in ccd.conf(5)
Each line of the configuration file contains arguments as per the -c
argument to ccdconfig(8):
ccd ileave [flags] dev [...]
And that is indeed what ccdconfig expects (both as command line
args & in the ccd.conf file).
While getting the size (that's what that big number between the
flags and the devices) might be useful information (it isn't otherwise
available from ccdconfig), it isn't in a suitable format for use as
the configuration file.
If someone decides this bug is worth fixing (it isn't exactly difficult
to work around) then perhaps also add a -p option, to print the
config (which could be combined with -v to perhaps include additional
information - like the flags as strings, rather than a single hex
number) as well as including the size, and perhaps even turning the
/dev/dk15 (etc) wedge names back into NAME=label type strings, when
possible (that would be useful with -g as well).
It is probably also a bug that -g can be combined with any one
of the "action" options (-c -C -u -U) and whichever is given
last wins (otherwise no two action options are permitted).
Note that currently "ccdconfig -g" without device names, prints the
first configured ccd's information N times (where N is the number
of configured ccd devices) is a kernel bug, which will be fixed
soon (as soon as I am done testing the very simple fix.)
>How-To-Repeat:
As above, simply run ccdconfig -g with a configured ccd, and
then attempt to use result as a ccd.conf line.
>Fix:
Just don't print the size in the output from -g (and also omit
the "size" from header that adding the -v option generates).
Ideally add another option to print all of the information about
one or more ccd's in a more human friendly form, and in that
output the size can be printed.
Home |
Main Index |
Thread Index |
Old Index