The length option is used to specify the number of zones to
operate on. To be more consistent with other tools, have this
option use a number of sectors and introduce the --count option
to allow users to specify a number of zones.
The --count and --length options cannot be used together on
the command line.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Add "0x" to the zone start, length and write pointer print
to make it always clear that the values are Hexadecimal.
Also update the zone condition string and associated comments
to match more closely the wording in the standard document.
The man page is also updated to match the new wording.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Report all zones of the block device when length is not specified
on the command line. To do this, introduce an inner loop in
blkzone_report to repeatedly issue report zone ioctl to the
device.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
If length is 0, operate on all zones starting from offset.
This also fix the maximum length calculation from offset.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Let's follow only $enable_ variables. In this case the MASTERNAME
(e.g. [schedutils] for --enable-schedutils) has to be without
UL_BUILD_INIT.
Signed-off-by: Karel Zak <kzak@redhat.com>
* add UL_ENABLE_ALIAS(NAME, MASTERNAME) to initialize $enable_<name>
according to MASTERNAME. Note that we have to use $build_<mastername>,
the $enable_<mastername> is just AC_ARG_ENABLE() stuff only. The
$build_ is evaluated and modified by our UL_...() functions.
* add enable-schedutils.conf to have build-system regression test for
this use-case
Addresses: https://github.com/karelzak/util-linux/issues/415
Signed-off-by: Karel Zak <kzak@redhat.com>
Else these variables will cause following warning:
libblkid/src/superblocks/superblocks.c:165:29: warning: symbol
'superblocks_drv' was not declared. Should it be static?
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer
Since many 'struct option' has used zero as NULL make them more readable in
same go by reindenting, and using named argument requirements.
Reference: https://lwn.net/Articles/93577/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/cfdisk.c:1066:29: error: cannot size expression
One should use sizeof() only when variable size can be known at time of
compilation. That is not the case with variable length arrays.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
[kzak@redhat.com: - rename --dry-run to --no-act]
Signed-off-by: Alexander F Rødseth <xyproto@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Tell in manual page what ZAC and ZBC acronyms mean. Include explanation to
blkreport output, so that users do not need to search source code to
understand what the tool informed. And fix couple dot double space issues.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Set variables read-only where possible. Fix few code style issues, mostly
with spacing. Avoid initializing variables if they are never read before
next update. Remove "ERR: %d -> %s" message that repeated system error
three times, twice in that message and once at end of main that is the only
of these three left in place.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The pid 0 is technically correct, but very confusing for end users. Use
getpid() in the messages.
Addresses: https://github.com/karelzak/util-linux/issues/413
Signed-off-by: Karel Zak <kzak@redhat.com>