Commit Graph

28 Commits

Author SHA1 Message Date
Dave Reisner 283d626b36 logger: use memcpy instead of bcopy
bcopy is marked legacy in POSIX.1-2001 and should not be used.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-29 09:33:14 +02:00
Dave Reisner 82054b1d99 logger: mark decode/pencode as static
Move these functions to the top of the file where they can be marked
static and the prototypes can be removed.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-29 09:32:13 +02:00
Dave Reisner 652add4c2c logger: avoid explicit fclose(stdout)
This is done for us via an atexit hook since c05a80ca63. Avoids a
useless 'Write error' on exit whenever invoking the tool.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-29 09:32:10 +02:00
maximilian attems adddfd37a1 misc-utils: cleanup unused strings.h includes
Noticed on klibc building.

Signed-off-by: maximilian attems <max@stro.at>
2012-05-23 10:31:12 +02:00
Karel Zak 495b13983e Merge branch 'master' of https://github.com/jhuntwork/util-linux 2012-05-23 09:39:40 +02:00
Karel Zak db41a4298f misc-utils: cleanup strtoxx_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-15 17:44:37 +02:00
Jeremy Huntwork 1c935e725e Remove use of __P. Its intended usage was to support pre-ANSI C compilers, but that is not even possible with the modern-day codebase. Moreover, it breaks compiling on libcs that do not define this legacy implementation-internal macro. 2012-05-13 16:32:51 +00:00
Sami Kerola c05a80ca63 misc-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04 19:56:48 +02:00
Karel Zak 86248cd28a logger: fix remote logging
Reported-by: Hervé Quillévéré <herve_quillevere@herveq.tk>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-08 10:20:22 +01:00
Karel Zak f3970c99b7 logger: non-ANSI definition [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 16:13:58 +02:00
Karel Zak 2da4918695 logger: indent usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 12:23:15 +02:00
Benno Schulenberg 0050c52917 logger: improve, sort and slice up usage() help text
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-16 10:16:38 +02:00
Sami Kerola 49999d6aef logger: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-08 12:04:06 +01:00
Sami Kerola b363e86d76 logger: support long options
Use getopt_long and usage output changed to match long options.
This patch will also scrutiny argument of formerly undocumented
-P option.

[kzak@redhat.com: - include c.h]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-08 11:55:28 +01:00
Sami Kerola dd49983ad9 logger: fix variable type compiler warning
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-03-08 11:49:57 +01:00
WUEBBELS, Josef \(Extern\) 912d6b9892 logger: support for logging to UDP socket / remote syslog server
It adds the ability to logger to log a message to a udp socket.  The -n option
followed by the hostname of the remote host is mandatory to do this.  The
optional -P option can be used to change the UDP destination port (default
514).  The function udpopenlog is used to open the udp socket. After that
everything works in almost the same way like it does when logging to a UNIX
socket.

Signed-off-by: Josef Wuebbels <josef.wuebbels@mtu.de>
2011-02-14 17:59:28 +01:00
Daniel Mierswa c0f19ccff7 replace bcopy,bzero,index and rindex
Those 4 functions are marked as LEGACY in POSIX.1-2001 and removed in
POSIX.1-2008.

Replaced with memmove,memset,strchr and strrchr.

Signed-off-by: Daniel Mierswa <impulze@impulze.org>
2009-08-17 11:15:59 +02:00
Pedro Ribeiro 331b704481 logger: several strings without gettext calls
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 09:17:07 +02:00
LaMont Jones dd0d165479 logger: use snprintf instead of sprintf in logger.c
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-24 00:22:20 +02:00
Karel Zak 2cccd0ff2b Imported from util-linux-2.12d tarball. 2006-12-07 00:26:18 +01:00
Karel Zak ffc4374869 Imported from util-linux-2.11o tarball. 2006-12-07 00:25:53 +01:00
Karel Zak c07ebfa1e0 Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
Karel Zak 66ee8158b6 Imported from util-linux-2.10s tarball. 2006-12-07 00:25:44 +01:00
Karel Zak 22853e4a82 Imported from util-linux-2.10m tarball. 2006-12-07 00:25:43 +01:00
Karel Zak eb63b9b8f4 Imported from util-linux-2.10f tarball. 2006-12-07 00:25:41 +01:00
Karel Zak 7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
Karel Zak 2b6fc908bc Imported from util-linux-2.8 tarball. 2006-12-07 00:25:35 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00