Commit graph

18 commits

Author SHA1 Message Date
Karel Zak
d91757a0f9 ldattach: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:53:11 +02:00
Karel Zak
20a3998222 sys-utils: cleanup strtoxx_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-15 17:45:17 +02:00
Sami Kerola
efb8854f4c sys-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04 19:49:40 +02:00
Sami Kerola
ba64bbd224 ldattach: add default case to switches
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>
2011-11-02 19:26:15 +01:00
Sami Kerola
3a13401204 ldattach: convert debug macro to function
warning: ISO C does not permit named variadic macros

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 19:10:24 +01:00
Sami Kerola
7b2d3de475 ldattach: check numeric user inputs with strtol_or_err
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 19:10:12 +01:00
Sami Kerola
a8023b9aec ldattach: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:57 +01:00
Sami Kerola
28e91b8395 ldattach: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-02 18:41:57 +01:00
Karel Zak
5ff204235d ldattach: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 13:30:26 +02:00
Fabian Groffen
eb76ca98b0 build-sys: provide alternatives for err, errx, warn and warnx
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>
2011-02-14 17:45:24 +01:00
Karel Zak
b5b28b435e ldattach: prints help to stdout
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-01 10:51:12 +01:00
Tilman Schmidt
b091b880f9 ldattach: add --iflag command line option
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>
2010-03-01 10:45:47 +01:00
Karel Zak
7b549aff71 ldattach: create a generic functions for name=value tables
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-01 10:25:55 +01:00
Karel Zak
becc79d5b6 ldattach: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:00:27 +02:00
Tilman Schmidt
d5f36dec92 ldattach: add N_PPS support
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>
2009-06-29 22:31:15 +02:00
Karel Zak
f8132752db ldattach: use glibc termios
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-09 11:48:24 +02:00
Karel Zak
fcba457783 ldattach: add NLS support
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-03-25 22:59:47 +01:00
Tilman Schmidt
1e8d11c459 ldattach: new command
Add an ldattach(8) utility program similar to the one in OpenBSD.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
2008-03-10 14:20:26 +01:00