Commit Graph

519 Commits

Author SHA1 Message Date
Sami Kerola 98e2d4deb3 wall: remove global variables and support TMPDIR
The TMPDIR environment is preferred over _PATH_TMP in which a
file is created that is ultimately sent to terminals. This patch
will also fix compiler warnings and removes magical numbers,
which has not explanation.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-12 11:09:42 +02:00
Karel Zak 9497ebb074 setterm: use xmalloc()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-06 11:24:23 +02:00
Sami Kerola 172ba4f2a8 setterm: fix variable types, and unused argument warnings
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-06 11:21:48 +02:00
Sami Kerola 9350520053 setterm: add note about long dump file paths to man page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-06 11:20:48 +02:00
Sami Kerola a973947c88 setterm: function screendump coding style fixed
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-06 11:19:15 +02:00
Sami Kerola 6e8e22adf6 setterm: mention in man setterm.1 -version and -help switches
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-06 11:15:15 +02:00
Sami Kerola 261f1423fb setterm: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-06 11:13:40 +02:00
Sami Kerola faa0548de4 setterm: support -help and -version options
[kzak@redhat.com: - merge all options to the one string]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-06 11:10:34 +02:00
Sami Kerola 2971543625 setterm: segfault with long dump file name
The patch will make too long path to be truncated to MAX_PATH
lenght. If user supplies too long file name that is caught at
fopen. Some users might find this unintuitive, so the altered
behavior will be mantioned in manual page.

Bug in earlier version was visible with a command bellow.

setterm -dump -file $(for i in $(seq 254); do printf x ; done)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-06 10:59:17 +02:00
Karel Zak c738bc32a4 build-sys: fix distcheck for term-utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-04 10:53:07 +02:00
Karel Zak 6c7d5ae9a2 move struct option to .rodata
It does not make sense to have writable large arrays of "struct
option" on the stack.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-03 15:00:30 +01:00
Karel Zak 342da61035 build-sys: add term-utils/.gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 14:29:34 +01:00
Karel Zak db6772a19c build-sys: move wall to term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 14:20:33 +01:00
Karel Zak c4571e4908 build-sys: move mesg to term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 14:18:31 +01:00
Karel Zak 720d1af42e build-sys: move reset to term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 14:08:30 +01:00
Karel Zak c76d33bacc build-sys: move script and scriptreplay to term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 14:06:23 +01:00
Karel Zak 8c59914ee2 build-sys: move setterm to term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 14:02:01 +01:00
Karel Zak cf56b8b507 build-sys: move agetty to term-utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 13:57:00 +01:00
Karel Zak c0f20acb7a build-sys: add term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 13:54:05 +01:00