The vwarnx(3) is probably not available in all libc implementations, in such
cases use the earlier printout as a fallback.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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>
We are using better/shorter error messages and somtimes
also errtryhelp().
Here we fix all cases where the usage function took
an int argument for exit_code.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
The Gigaset M101 exhibits particularly awkward and confusing behaviour
when the serial line speed isn't set to what the device expects:
Configuration mode detects the used speed and works anyway, but data
mode silently fails. Troubleshooting this is enormously time-consuming.
Spare the users this trouble by setting the line speed and format to
these devices' factory default values as long as the command line
doesn't say otherwise.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
The hardcoded column width of 10 in print_table() is not enough, as
the currently longest table entry to be printed has 12 characters.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
This adds a concise description of a tool to its usage text.
A first form of this patch was proposed by Steven Honeyman
(see http://www.spinics.net/lists/util-linux-ng/msg09994.html).
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Patch add:
--intro-command string : send command to modem
--pause value : define delay between intro command and ldattach
Based on patch from Martin Schmid <scm@aps-systems.ch>
Signed-off-by: Karel Zak <kzak@redhat.com>
The warnings bellow are about impossible case, so makign abort() as
default seems correct.
ldattach.c:305:2: warning: switch missing default case [-Wswitch-default]
ldattach.c:313:2: warning: switch missing default case [-Wswitch-default]
ldattach.c:321:2: warning: switch missing default case [-Wswitch-default]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Solaris lacks err, errx, warn and warnx. This also means the err.h header
doesn't exist. Removed err.h include from all files, and included err.h from
c.h instead if it exists, otherwise alternatives are provided.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Add a command line option '-i' / '--iflag' for setting or clearing
input flags on the serial device before attaching the line discipline.
[kzak@redhat.com: - use generic functions for work with iflags table
- add list of iflags to usage/help output
- move iflags parsing to separate function]
Impact: added functionality
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Karel Zak <kzak@redhat.com>
Add support for a line discipline name "PPS" selecting the
Pulse Per Second line discipline N_PPS (18). The number has been
reserved since kernel release 2.6.28, and the implementation is
finally going to be submitted for kernel release 2.6.31.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>