diff options
author | Karel Zak | 2006-12-07 00:26:54 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:54 +0100 |
commit | 48d7b13a1eab85fab91c8d6c5ddf298f733c74f5 (patch) | |
tree | 8813d36590ee3361bd75f57a12fd2032e9296ddb /misc-utils/script.c | |
parent | Imported from util-linux-2.12r tarball. (diff) | |
download | kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.tar.gz kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.tar.xz kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.zip |
Imported from util-linux-2.13-pre1 tarball.
Diffstat (limited to 'misc-utils/script.c')
-rw-r--r-- | misc-utils/script.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/misc-utils/script.c b/misc-utils/script.c index 81747a619..f5e01f676 100644 --- a/misc-utils/script.c +++ b/misc-utils/script.c @@ -59,8 +59,7 @@ #include <string.h> #endif -#include "../defines.h" -#ifdef HAVE_openpty +#ifdef HAVE_LIBUTIL #include <pty.h> #endif @@ -87,7 +86,7 @@ struct termios tt; struct winsize win; int lb; int l; -#ifndef HAVE_openpty +#ifndef HAVE_LIBUTIL char line[] = "/dev/ptyXX"; #endif int aflg = 0; @@ -140,8 +139,8 @@ main(int argc, char **argv) { if (argc == 2) { if (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")) { - printf(_("%s from %s\n"), - progname, util_linux_version); + printf(_("%s from %s%s\n"), + progname, "util-linux-", VERSION); return 0; } } @@ -270,7 +269,7 @@ dooutput() { double oldtime=time(NULL), newtime; (void) close(0); -#ifdef HAVE_openpty +#ifdef HAVE_LIBUTIL (void) close(slave); #endif tvec = time((time_t *)NULL); @@ -373,7 +372,7 @@ done() { void getmaster() { -#ifdef HAVE_openpty +#ifdef HAVE_LIBUTIL (void) tcgetattr(0, &tt); (void) ioctl(0, TIOCGWINSZ, (char *)&win); if (openpty(&master, &slave, NULL, &tt, &win) < 0) { @@ -413,12 +412,12 @@ getmaster() { } fprintf(stderr, _("Out of pty's\n")); fail(); -#endif /* not HAVE_openpty */ +#endif /* not HAVE_LIBUTIL */ } void getslave() { -#ifndef HAVE_openpty +#ifndef HAVE_LIBUTIL line[strlen("/dev/")] = 't'; slave = open(line, O_RDWR); if (slave < 0) { |