diff options
author | Bernhard Reutner-Fischer | 2008-05-19 08:18:50 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2008-05-19 08:18:50 +0000 |
commit | ae4342ca3e30f7b11732ecda3ad15821e81bc314 (patch) | |
tree | 1878104940eac4649bc8add4d0b2893ab1cb0a94 /libbb/getpty.c | |
parent | ee56e013cfb6304f66129afee7978b0864699419 (diff) | |
download | busybox-ae4342ca3e30f7b11732ecda3ad15821e81bc314.zip busybox-ae4342ca3e30f7b11732ecda3ad15821e81bc314.tar.gz |
- Rename getpty() to xgetpty() and adjust callers.
- Rewrite kbd_mode and setconsole
- Introduce and use console_make_active() and xopen_xwrite_close()
- honour buffer-reservation method as set by the user (dumpkmap, loadkmap)
- shrink rtcwake and some console-tools
Saves about 270 Bytes
Diffstat (limited to 'libbb/getpty.c')
-rw-r--r-- | libbb/getpty.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libbb/getpty.c b/libbb/getpty.c index 5ac9582..d43fb82 100644 --- a/libbb/getpty.c +++ b/libbb/getpty.c @@ -10,7 +10,7 @@ #define DEBUG 0 -int getpty(char *line) +int xgetpty(char *line) { int p; #if ENABLE_FEATURE_DEVPTS @@ -22,7 +22,7 @@ int getpty(char *line) name = ptsname(p); if (!name) { bb_perror_msg("ptsname error (is /dev/pts mounted?)"); - return -1; + goto fail; } safe_strncpy(line, name, GETPTY_BUFSIZE); return p; @@ -52,7 +52,9 @@ int getpty(char *line) } } #endif /* FEATURE_DEVPTS */ - return -1; +USE_FEATURE_DEVPTS( fail:) + bb_error_msg_and_die("open pty"); + return -1; /* never get here */ } |