Add target_ops argument to to_fileio_readlink

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_fileio_readlink>: Add argument.
	* target.c (target_fileio_readlink): Add argument.
	* remote.c (remote_hostio_readlink): Add 'self' argument.
	* inf-child.c (inf_child_fileio_readlink): Add 'self' argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:39:24 -07:00
parent dbbca37d38
commit fab5aa7c3f
5 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_fileio_readlink>: Add argument.
* target.c (target_fileio_readlink): Add argument.
* remote.c (remote_hostio_readlink): Add 'self' argument.
* inf-child.c (inf_child_fileio_readlink): Add 'self' argument.
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_fileio_unlink>: Add argument.

View File

@ -344,7 +344,8 @@ inf_child_fileio_unlink (struct target_ops *self,
null-terminated string allocated via xmalloc, or NULL if an error
occurs (and set *TARGET_ERRNO). */
static char *
inf_child_fileio_readlink (const char *filename, int *target_errno)
inf_child_fileio_readlink (struct target_ops *self,
const char *filename, int *target_errno)
{
/* We support readlink only on systems that also provide a compile-time
maximum path length (PATH_MAX), at least for now. */

View File

@ -9791,7 +9791,8 @@ remote_hostio_unlink (struct target_ops *self,
occurs (and set *REMOTE_ERRNO). */
static char *
remote_hostio_readlink (const char *filename, int *remote_errno)
remote_hostio_readlink (struct target_ops *self,
const char *filename, int *remote_errno)
{
struct remote_state *rs = get_remote_state ();
char *p = rs->buf;

View File

@ -3509,7 +3509,7 @@ target_fileio_readlink (const char *filename, int *target_errno)
{
if (t->to_fileio_readlink != NULL)
{
char *ret = t->to_fileio_readlink (filename, target_errno);
char *ret = t->to_fileio_readlink (t, filename, target_errno);
if (targetdebug)
fprintf_unfiltered (gdb_stdlog,

View File

@ -746,7 +746,8 @@ struct target_ops
/* Read value of symbolic link FILENAME on the target. Return a
null-terminated string allocated via xmalloc, or NULL if an error
occurs (and set *TARGET_ERRNO). */
char *(*to_fileio_readlink) (const char *filename, int *target_errno);
char *(*to_fileio_readlink) (struct target_ops *,
const char *filename, int *target_errno);
/* Implement the "info proc" command. */