This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3 v3] Implement remote_bfd_iovec_stat using vFile:fstat
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>, gdb-patches at sourceware dot org
- Date: Tue, 10 Mar 2015 18:36:29 +0000
- Subject: Re: [PATCH 3/3 v3] Implement remote_bfd_iovec_stat using vFile:fstat
- Authentication-results: sourceware.org; auth=none
- References: <1425986407-18203-1-git-send-email-gbenson at redhat dot com> <1426002678-30472-1-git-send-email-gbenson at redhat dot com>
Sorry, forgot to merge this comment with the other mail...
On 03/10/2015 03:51 PM, Gary Benson wrote:
> + into ST. Return 0 on success, or -1 if an error occurs (and
> + set *REMOTE_ERRNO). */
> +
> +static int
> +remote_hostio_fstat (struct target_ops *self,
> + int fd, struct stat *st,
> + int *remote_errno)
> +{
> + struct remote_state *rs = get_remote_state ();
> + char *p = rs->buf;
> + int left = get_remote_packet_size ();
> + int attachment_len, ret;
> + char *attachment;
> + struct fio_stat fst;
> + int read_len;
> +
> + if (packet_support (PACKET_vFile_fstat) != PACKET_ENABLE)
> + {
> + memset (st, 0, sizeof (struct stat));
> + st->st_size = INT_MAX;
A future reader may wonder why this isn't ENOSYS instead. I think
a comment here would help.
> + return 0;
> + }
Thanks,
Pedro Alves