This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: ioctl h8300 specific problem fix
- From: Yoshinori Sato <ysato at users dot sourceforge dot jp>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: Yoshinori Sato <ysato at users dot sourceforge dot jp>,ecos-patches at sources dot redhat dot com
- Date: Thu, 10 Feb 2005 15:40:40 +0900
- Subject: Re: ioctl h8300 specific problem fix
- References: <m27jlynbkz.wl%ysato@users.sourceforge.jp><20050208195815.GJ23679@lunn.ch>
At Tue, 8 Feb 2005 20:58:15 +0100,
Andrew Lunn wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> On Fri, Jan 28, 2005 at 12:19:56AM +0900, Yoshinori Sato wrote:
> > please commit.
> >
> > Index: io/fileio/current/ChangeLog
> > ===================================================================
> > RCS file: /cvsroot/ecos-h8/ecos/packages/io/fileio/current/ChangeLog,v
> > retrieving revision 1.1.1.13
> > retrieving revision 1.2
> > diff -u -r1.1.1.13 -r1.2
> > --- io/fileio/current/ChangeLog 27 Jan 2005 02:38:13 -0000 1.1.1.13
> > +++ io/fileio/current/ChangeLog 27 Jan 2005 14:10:56 -0000 1.2
> > @@ -1,3 +1,10 @@
> > +2005-01-27 Yoshinori Sato <ysato@users.sourceforge.jp>
> > +
> > + * src/io.cxx (ioctl): Change a receipt of argument in variable length
> > + with h8300.
> > + Because it is a register normally, cannot get argument rightly
> > + that don't agree with prototype.
> > +
>
> After some discussion with the maintainers we decided to do this
> slightly differently. Please see the attached patch which has been
> committed.
>
> Andrew
> [2 ioctl.diff <text/plain; us-ascii (7bit)>]
> ? io/pipe
> ? io/pty
> Index: io/fileio/current/ChangeLog
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/io/fileio/current/ChangeLog,v
> retrieving revision 1.54
> diff -u -r1.54 ChangeLog
> --- io/fileio/current/ChangeLog 22 Jan 2005 14:03:37 -0000 1.54
> +++ io/fileio/current/ChangeLog 8 Feb 2005 19:58:06 -0000
> @@ -1,3 +1,8 @@
> +2005-01-27 Yoshinori Sato <ysato@users.sourceforge.jp>
> +
> + * src/io.cxx (ioctl): Change ioctl to use varargs so that it works
> + on with h8300 who's compiler does not like doing it the other way.
> +
> 2005-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
>
> * src/misc.cxx (cyg_fs_root_lookup): New function to find the mount
> Index: io/fileio/current/src/io.cxx
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/io/fileio/current/src/io.cxx,v
> retrieving revision 1.10
> diff -u -r1.10 io.cxx
> --- io/fileio/current/src/io.cxx 16 Feb 2004 16:25:45 -0000 1.10
> +++ io/fileio/current/src/io.cxx 8 Feb 2005 19:58:07 -0000
> @@ -252,18 +252,24 @@
> //==========================================================================
> // ioctl
>
> -__externC int ioctl( int fd, CYG_ADDRWORD com, CYG_ADDRWORD data )
> +__externC int ioctl( int fd, CYG_ADDRWORD com, ... )
> {
> FILEIO_ENTRY();
>
> int ret;
> cyg_file *fp;
> -
> + va_list ap;
> + CYG_ADDRWORD data;
> +
> fp = cyg_fp_get( fd );
>
> if( fp == NULL )
> FILEIO_RETURN(EBADF);
>
> + va_start(ap, com);
> + data = va_arg(ap, CYG_ADDRWORD);
> + va_end(ap);
> +
> LOCK_FILE( fp );
>
> ret = fp->f_ops->fo_ioctl( fp, com, data );
I identified it. work normally.
--
Yoshinori Sato
<ysato@users.sourceforge.jp>