This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfa] remote-fileio.c, remote_fileio_func_fstat, uninitialized st.st_ino.
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 3 Mar 2011 09:28:57 +0100
- Subject: Re: [rfa] remote-fileio.c, remote_fileio_func_fstat, uninitialized st.st_ino.
- References: <4D6EBB4A.9080207@vmware.com> <20110303043643.GV30306@adacore.com>
- Reply-to: gdb-patches at sourceware dot org
On Mar 3 08:36, Joel Brobecker wrote:
> > 2011-03-02 Michael Snyder <...>
> >
> > * remote-fileio.c (remote_fileio_func_fstat): Initialize st_ino
> > to zero.
>
> FWIW: The initialization is made for the case where the file descriptor
> is not a file, so we should be ablet to deduce that the st_ino (inode ID)
> is irrelevant and not used on the consumer side... This would suggest
> that your change is correct. (you should still wait for Corinna to
> comment)
The descriptors are console descriptors so the inode number doesn't
matter and the patch is ok.
I'm just wondering, can we assume that the stat structure has always an
st_ino member? THere are checks for st_blocks and st_blksize in place
already. Is the same required for st_ino?
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat