aboutsummaryrefslogtreecommitdiff
path: root/pty.c
diff options
context:
space:
mode:
authorMatthias-Christian Ott <ott@enolink.de>2008-07-04 18:05:08 +0200
committerMatthias-Christian Ott <ott@enolink.de>2008-07-04 18:05:08 +0200
commitf982c1c37ccc4adc38260a132aa64ee29d1a1a8c (patch)
tree5d2ca4b666b91eed75ce2b16c3cd7ab785e66838 /pty.c
parentd83cbc27b99427d00846832a73810f285d8f0d05 (diff)
downloadst-f982c1c37ccc4adc38260a132aa64ee29d1a1a8c.tar.gz
st-f982c1c37ccc4adc38260a132aa64ee29d1a1a8c.tar.bz2
st-f982c1c37ccc4adc38260a132aa64ee29d1a1a8c.zip
replace eprint() functions with BSD error functions
Diffstat (limited to 'pty.c')
-rw-r--r--pty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pty.c b/pty.c
index 4c38d86..a173dab 100644
--- a/pty.c
+++ b/pty.c
@@ -22,22 +22,22 @@ getpty(void) {
ptm = open("/dev/ptmx", O_RDWR);
if(ptm == -1)
if(openpty(&ptm, &pts, NULL, NULL, NULL) == -1)
- eprintn("error, cannot open pty");
+ err(EXIT_FAILURE, "cannot open pty");
#endif
#if defined(_XOPEN_SOURCE)
if(ptm != -1) {
if(grantpt(ptm) == -1)
- eprintn("error, cannot grant access to pty");
+ err(EXIT_FAILURE, "cannot grant access to pty");
if(unlockpt(ptm) == -1)
- eprintn("error, cannot unlock pty");
+ err(EXIT_FAILURE, "cannot unlock pty");
ptsdev = ptsname(ptm);
if(!ptsdev)
- eprintn("error, slave pty name undefined");
+ err(EXIT_FAILURE, "slave pty name undefined");
pts = open(ptsdev, O_RDWR);
if(pts == -1)
- eprintn("error, cannot open slave pty");
+ err(EXIT_FAILURE, "cannot open slave pty");
}
else
- eprintn("error, cannot open pty");
+ err(EXIT_FAILURE, "cannot open pty");
#endif
}