[OE-core] [PATCH] glibc_2.21.bb: Fix LSB bugs #3033
Li, Xin
lixin.fnst at cn.fujitsu.com
Mon May 11 03:07:18 UTC 2015
> -----Original Message-----
> From: Khem Raj [mailto:raj.khem at gmail.com]
> Sent: Saturday, May 09, 2015 12:21 AM
> To: Li, Xin/李 欣
> Cc: openembedded-core at lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] glibc_2.21.bb: Fix LSB bugs #3033
>
>
> This patch is ok. However two questions
> 1. what kernel version do you see it on and is kernel piece fixed too or is not
> required 2. Has this been submitted to glibc ?
>
I see it on the kernel version 3.14.28 and the kernel piece is not fixed.
also I have not send the patch to glibc.
Cheers,
Li xin
> > Signed-off-by: Li Xin <lixin.fnst at cn.fujitsu.com>
> > ---
> > .../glibc/glibc/tcsetattr.c-Fix-LSB-NG-Cases.patch | 69 ++++++++++++++++++++++
> > meta/recipes-core/glibc/glibc_2.21.bb | 1 +
> > 2 files changed, 70 insertions(+)
> > create mode 100644
> > meta/recipes-core/glibc/glibc/tcsetattr.c-Fix-LSB-NG-Cases.patch
> >
> > diff --git
> > a/meta/recipes-core/glibc/glibc/tcsetattr.c-Fix-LSB-NG-Cases.patch
> > b/meta/recipes-core/glibc/glibc/tcsetattr.c-Fix-LSB-NG-Cases.patch
> > new file mode 100644
> > index 0000000..df0e61d
> > --- /dev/null
> > +++ b/meta/recipes-core/glibc/glibc/tcsetattr.c-Fix-LSB-NG-Cases.patch
> > @@ -0,0 +1,69 @@
> > +From 9022ee975265b65f59782ea92b59eccc95774a88 Mon Sep 17 00:00:00
> > +2001
> > +From: Li xin <lixin.fnst at cn.fujitsu.com>
> > +Date: Fri, 8 May 2015 13:51:30 +0900
> > +Subject: [PATCH] tcsetattr.c: Fix LSB NG Cases
> > +
> > +/tset/POSIX.os/devclass/tcgetattr/T.tcgetattr 1 2
> > +/tset/POSIX.os/devclass/c_iflag/T.c_iflag 6 7 8 9
> > +
> > +This patch is from Fedora.
> > +
> > +Upstream-Status: pending.
> > +
> > +Signed-off-by: Li Xin <lixin.fnst at cn.fujitsu.com>
> > +---
> > + sysdeps/unix/sysv/linux/tcsetattr.c | 32
> > ++++++++++++++++++++++++++++++++-
> > + 1 file changed, 31 insertions(+), 1 deletion(-)
> > +
> > +diff --git a/sysdeps/unix/sysv/linux/tcsetattr.c
> > +b/sysdeps/unix/sysv/linux/tcsetattr.c
> > +index d7afc63..7cb2c61 100644
> > +--- a/sysdeps/unix/sysv/linux/tcsetattr.c
> > ++++ b/sysdeps/unix/sysv/linux/tcsetattr.c
> > +@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios_p) {
> > + struct __kernel_termios k_termios;
> > + unsigned long int cmd;
> > ++ int retval;
> > +
> > + switch (optional_actions)
> > + {
> > +@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios_p)
> > + memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
> > + __KERNEL_NCCS * sizeof (cc_t));
> > +
> > +- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
> > ++ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
> > ++
> > ++ if (retval == 0 && cmd == TCSETS)
> > ++ {
> > ++ /* The Linux kernel has a bug which silently ignore the invalid
> > ++ c_cflag on pty. We have to check it here. */
> > ++ int save = errno;
> > ++ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
> > ++ if (retval)
> > ++ {
> > ++ /* We cannot verify if the setting is ok. We don't return
> > ++ an error (?). */
> > ++ __set_errno (save);
> > ++ retval = 0;
> > ++ }
> > ++ else if ((termios_p->c_cflag & (PARENB | CREAD))
> > ++ != (k_termios.c_cflag & (PARENB | CREAD))
> > ++ || ((termios_p->c_cflag & CSIZE)
> > ++ && ((termios_p->c_cflag & CSIZE)
> > ++ != (k_termios.c_cflag & CSIZE))))
> > ++ {
> > ++ /* It looks like the Linux kernel silently changed the
> > ++ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
> > ++ error. */
> > ++ __set_errno (EINVAL);
> > ++ retval = -1;
> > ++ }
> > ++ }
> > ++
> > ++ return retval;
> > + }
> > + libc_hidden_def (tcsetattr)
> > +--
> > +1.8.4.2
> > +
> > diff --git a/meta/recipes-core/glibc/glibc_2.21.bb
> > b/meta/recipes-core/glibc/glibc_2.21.bb
> > index 58a9601..a061b08 100644
> > --- a/meta/recipes-core/glibc/glibc_2.21.bb
> > +++ b/meta/recipes-core/glibc/glibc_2.21.bb
> > @@ -27,6 +27,7 @@ SRC_URI =
> "git://sourceware.org/git/glibc.git;branch=${BRANCH} \
> > file://0001-yes-within-the-path-sets-wrong-config-variables.patch \
> > file://elf-Makefile-fix-a-typo.patch \
> > ${EGLIBCPATCHES} \
> > + file://tcsetattr.c-Fix-LSB-NG-Cases.patch \
> > "
> > EGLIBCPATCHES = "\
> > file://timezone-re-written-tzselect-as-posix-sh.patch \
> > --
> > 1.8.4.2
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list