diff options
author | Karel Zak | 2006-12-07 00:25:41 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:25:41 +0100 |
commit | eb63b9b8f4cecb34c2478282567862bc48ef256d (patch) | |
tree | 99243f8eecb44c2bb6a559982b99c680fcb649e7 /misc-utils/logger.c | |
parent | Imported from util-linux-2.9v tarball. (diff) | |
download | kernel-qcow2-util-linux-eb63b9b8f4cecb34c2478282567862bc48ef256d.tar.gz kernel-qcow2-util-linux-eb63b9b8f4cecb34c2478282567862bc48ef256d.tar.xz kernel-qcow2-util-linux-eb63b9b8f4cecb34c2478282567862bc48ef256d.zip |
Imported from util-linux-2.10f tarball.
Diffstat (limited to 'misc-utils/logger.c')
-rw-r--r-- | misc-utils/logger.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 4c881c968..9d848a660 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -210,6 +210,13 @@ main(argc, argv) } } else while (fgets(buf, sizeof(buf), stdin) != NULL) { + /* glibc is buggy and adds an additional newline, + so we have to remove it here until glibc is fixed */ + int len = strlen(buf); + + if (len > 0 && buf[len - 1] == '\n') + buf[len - 1] = '\0'; + if (!usock) syslog(pri, "%s", buf); else |