This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] remote-fileio.c, remote_fileio_func_fstat, uninitialized st.st_ino.


> 2011-03-02  Michael Snyder  <msnyder@vmware.com>
> 
> 	* 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)

> Index: remote-fileio.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote-fileio.c,v
> retrieving revision 1.40
> diff -u -p -u -p -r1.40 remote-fileio.c
> --- remote-fileio.c	25 Jan 2011 11:54:00 -0000	1.40
> +++ remote-fileio.c	2 Mar 2011 21:41:48 -0000
> @@ -1175,6 +1175,7 @@ remote_fileio_func_fstat (char *buf)
>        remote_fileio_to_fio_uint (1, fst.fst_dev);
>        st.st_mode = S_IFCHR | (fd == FIO_FD_CONSOLE_IN ? S_IRUSR : S_IWUSR);
>        st.st_nlink = 1;
> +      st.st_ino = 0;
>  #ifdef HAVE_GETUID
>        st.st_uid = getuid ();
>  #else


-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]