The header <ncursesw/ncurses.h> defines the get_wch(3) function only
when `NCURSES_WIDECHAR` is defined. This define is actually getting set
in the same header file, but only in case `_XOPEN_SOURCE` is defined and
has a value of 500 or higher. As we already have the precedence of
defining `_XOPEN_SOURCE` to a value of 600 in some other files, simply
define it to the minimum required value of 500 in "cfdisk.c". This
silences a warning for `get_wch` being unknown.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Let's make it possible to use debug.h without environment variables.
Suggested-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
changed in include/c.h and applied via sed:
sed -i 's/fprintf.*\(USAGE_MAN_TAIL.*\)/printf(\1/' $(git ls-files -- "*.c")
sed -i 's/print_usage_help_options\(.*\);/printf(USAGE_HELP_OPTIONS\1);/' $(git ls-files -- "*.c")
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Consolidate --help and --version descriptions. We are
now able to align them to the other options.
We changed include/c.h. The rest of this patch was
generated by sed, plus manually setting the right
alignment numbers. We do not change anything but
white spaces in the --help output.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This patch is trivial and changes nothing, because
we were always using usage(stdout)
Now all our usage() functions look very similar. If wanted we
could auto-generate another big cosmetical patch to remove all
the useless "FILE *out" constants and use printf and puts
rather than their f* friends. Such patch could be automatically
synchronized with the translation project (newlines!) to not
make the translators sick.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
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>
Fix various typos in error messages, warnings, debug strings,
comments and names of static functions.
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
The option allows to remove filesystes/RAIDs from newly created
partitions before the partition table is updated (and partition
device created).
The default is "auto" in this case wipe is enabled in interactive mode
only and user's confirmation (yes/no dialog) is required. Note that
keep filesystem signature on partition is pretty valid use-case, so we
don't erase anything by default.
Signed-off-by: Karel Zak <kzak@redhat.com>
To make true the help text line that says that all commands
can be entered with either upper or lower case.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
For example when you move from a Partition to the FreeSapce then we
need to remove old extra info and draw nothing.
Signed-off-by: Karel Zak <kzak@redhat.com>
[disk-utils/cfdisk.c:1181] -> [disk-utils/cfdisk.c:1181]: (warning)
Possible null pointer dereference: data - otherwise it is redundant to
check it against null.
Signed-off-by: Boris Egorov <egorov@linux.com>
The patch removes problem with getch() on slang, now the code is based
on subwin() and extra info window is persistent.
A new problem is that slang does not keep sub-window border
persistent. I'm going to ignore this slang problem... use ncurses
dude!
Signed-off-by: Karel Zak <kzak@redhat.com>
The new 'extra' info provides:
* filesystem information from libblkid (TYPE, UUID, LABEL)
This feature is based on libblkid ability to probe specified area
on the device. It allows to probe for filesystems although the
partition devices (e.g. /dev/sda2) does not exist. For example from
disk image:
# cfdisk /home/archive/fs-images/disk.img
* additional information from libfdisk (partition UUID, Name, ...)
* mount information from libmount (from fstab or mountinfo)
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: Karel Zak <kzak@redhat.com>