[uClibc] ttyname.c
Stefan Soucek
ssoucek at coactive.com
Wed Jun 13 20:56:30 UTC 2001
Yes,
The following patch solved our problems ("could not determine tty name"):
diff ttyname.c.orig ttyname.c
21c21
< strcpy(name + sizeof(dirname), d->d_name);
---
> strcpy(name + strlen(dirname) + 1, d->d_name);
I am using a 2.0.38 kernel. It seems this problem is general (and not only
related to devfs). A comparison to a binary linked vs glibc on a 386
confirms
this.
Can we have this change commited to the uClibc CVS?
Thanks,
-Stefan
--
Stefan Soucek, ssoucek at coactive.com
Coactive Networks, 4000 Bridgeway Suite 303, Sausalito, CA 94965
> -----Original Message-----
> From: jheiss at ofb.net [mailto:jheiss at ofb.net]
> Sent: Sunday, May 27, 2001 6:20 PM
> To: Erik Andersen
> Cc: merlin at phear.lwz.org; uclibc at uclibc.org
> Subject: Re: [uClibc] ttyname.c
>
>
> Changing line 21 of libc/termios/ttyname.c from:
>
> strcpy(name + sizeof(dirname), d->d_name);
>
> to
>
> strcpy(name + strlen(dirname) + 1, d->d_name);
>
> seemed to do the trick for me. However, I don't see how it could
> work for anyone (devfs or not) with the current code so maybe I'm
> missing something. dirname is a pointer, so the sizeof always
> returns 4. Thus it was checking things like /devconsole, /devtty1,
> etc.
>
> Jason
>
> P.S. Thanks for maintaining this stuff, it's pretty cool to throw
> together a working Linux system on a floppy in just a couple of days.
> Linux 2.4.4, uClibc, devfsd, busybox, tinylogin and ash down.
> Netfilter, FreeS/WAN and PPPoE to go; and 305k left on the floppy. :)
>
> Jason
>
> On Sat, May 26, 2001 at 01:08:18AM -0600, Erik Andersen wrote:
> > On Fri May 25, 2001 at 11:20:56PM -0700, Jason Heiss wrote:
> > > I saw your message about ttyname and devfs in the archives for the
> > > mailing list. I'm having the same problem and wondered if you or
> > > anyone on the list had found a solution?
> >
> > I checked in what I believe should solve it. I don't use
> devfs myself,
> > so I am still waiting to hear from someone whether it
> indeed is fixed,
> >
> > -Erik
> >
> > --
> > Erik B. Andersen email: andersen at lineo.com
> > --This message was written using 73% post-consumer electrons--
> >
> >
> > _______________________________________________
> > uClibc mailing list
> > uClibc at uclibc.org
> > http://uclibc.org/mailman/listinfo/uclibc
>
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc
>
More information about the uClibc
mailing list