summaryrefslogtreecommitdiffstats
path: root/login-utils
diff options
context:
space:
mode:
authorKarel Zak2007-07-16 14:41:28 +0200
committerKarel Zak2007-07-16 14:52:18 +0200
commit529bdd94f4a2c6329f33623b8a70b51f3e60289f (patch)
treea694fe604e6703cd98daf903ab797bad8687077d /login-utils
parentdocs: update AUTHORS file (diff)
downloadkernel-qcow2-util-linux-529bdd94f4a2c6329f33623b8a70b51f3e60289f.tar.gz
kernel-qcow2-util-linux-529bdd94f4a2c6329f33623b8a70b51f3e60289f.tar.xz
kernel-qcow2-util-linux-529bdd94f4a2c6329f33623b8a70b51f3e60289f.zip
login-utils: remove unwanted newlines from wall
Prevent wall from adding an empty newline to every new line. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r--login-utils/wall.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/login-utils/wall.c b/login-utils/wall.c
index 2797f4651..c9893d7e4 100644
--- a/login-utils/wall.c
+++ b/login-utils/wall.c
@@ -221,7 +221,8 @@ makemsg(fname)
putc('\n', fp);
cnt = 0;
}
- carefulputc(ch, fp);
+ if (ch != '\n')
+ carefulputc(ch, fp);
}
}
fprintf(fp, "%79s\r\n", " ");