Add target_ops argument to to_fileio_unlink

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

	* target.h (struct target_ops) <to_fileio_unlink>: Add argument.
	* target.c (target_fileio_unlink): Add argument.
	* remote.c (remote_hostio_unlink): Add 'self' argument.
	(remote_file_delete): Update.
	* inf-child.c (inf_child_fileio_unlink): Add 'self' argument.
This commit is contained in:
Tom Tromey
2013-12-17 21:39:11 -07:00
parent df39ea259c
commit dbbca37d38
5 changed files with 17 additions and 5 deletions

View File

@@ -9770,7 +9770,8 @@ remote_hostio_close (struct target_ops *self, int fd, int *remote_errno)
occurs (and set *REMOTE_ERRNO). */
static int
remote_hostio_unlink (const char *filename, int *remote_errno)
remote_hostio_unlink (struct target_ops *self,
const char *filename, int *remote_errno)
{
struct remote_state *rs = get_remote_state ();
char *p = rs->buf;
@@ -10152,7 +10153,8 @@ remote_file_delete (const char *remote_file, int from_tty)
if (!rs->remote_desc)
error (_("command can only be used with remote target"));
retcode = remote_hostio_unlink (remote_file, &remote_errno);
retcode = remote_hostio_unlink (find_target_at (process_stratum),
remote_file, &remote_errno);
if (retcode == -1)
remote_hostio_error (remote_errno);