summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.c
diff options
context:
space:
mode:
authorSamuel Thibault2011-06-20 12:48:35 +0200
committerKarel Zak2011-06-20 12:48:35 +0200
commit4585ec0b29c28a9c09f69c57ab0f40a69e2d641a (patch)
treedce10567333a912fc3c01dd38a04c8bea3fe085b /term-utils/agetty.c
parentmount: add ufstype=ufs2 to mount.8 (diff)
downloadkernel-qcow2-util-linux-4585ec0b29c28a9c09f69c57ab0f40a69e2d641a.tar.gz
kernel-qcow2-util-linux-4585ec0b29c28a9c09f69c57ab0f40a69e2d641a.tar.xz
kernel-qcow2-util-linux-4585ec0b29c28a9c09f69c57ab0f40a69e2d641a.zip
misc: hurd build fixes
* Make blkdev_is_misaligned return 0 when BLKALIGNOFF is not available. * Make procutils.c include c.h to get a PATH_MAX replacement. * Provide agetty.c USE_SYSLOG, DEFAULT_VCTERM and DEFAULT_STERM defaults for Hurd. * Make agetty.c only deal with OFDEL, XCASE and VSWTCH if they are available. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r--term-utils/agetty.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 45624f54d..6120a26b6 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -49,6 +49,14 @@
# ifndef DEFAULT_STERM
# define DEFAULT_STERM "vt102"
# endif
+#elif defined(__GNU__)
+# define USE_SYSLOG
+# ifndef DEFAULT_VCTERM
+# define DEFAULT_VCTERM "hurd"
+# endif
+# ifndef DEFAULT_STERM
+# define DEFAULT_STERM "vt102"
+# endif
#else
# ifndef DEFAULT_VCTERM
# define DEFAULT_VCTERM "vt100"
@@ -1039,15 +1047,21 @@ static void reset_vc(const struct options *op, struct termios *tp)
tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL);
tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP);
tp->c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
- tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |\
+ tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \
NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);
tp->c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE);
- tp->c_lflag &= ~(ECHONL|ECHOCTL|ECHOPRT | NOFLSH | XCASE | TOSTOP);
+ tp->c_lflag &= ~(ECHONL|ECHOCTL|ECHOPRT | NOFLSH | TOSTOP);
if ((op->flags & F_KEEPCFLAGS) == 0) {
tp->c_cflag |= (CREAD | CS8 | HUPCL);
tp->c_cflag &= ~(PARODD | PARENB);
}
+#ifdef OFDEL
+ tp->c_oflag &= ~OFDEL;
+#endif
+#ifdef XCASE
+ tp->c_lflag &= ~XCASE;
+#endif
#ifdef IUTF8
if (op->flags & F_UTF8)
tp->c_iflag |= IUTF8; /* Set UTF-8 input flag */
@@ -1067,7 +1081,7 @@ static void reset_vc(const struct options *op, struct termios *tp)
tp->c_cc[VEOF] = CEOF;
#ifdef VSWTC
tp->c_cc[VSWTC] = _POSIX_VDISABLE;
-#else
+#elif defined(VSWTCH)
tp->c_cc[VSWTCH] = _POSIX_VDISABLE;
#endif
tp->c_cc[VSTART] = CSTART;