+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.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_fileio_close>: Add argument.
/* Unlink FILENAME on the target. Return 0, or -1 if an error
occurs (and set *TARGET_ERRNO). */
static int
-inf_child_fileio_unlink (const char *filename, int *target_errno)
+inf_child_fileio_unlink (struct target_ops *self,
+ const char *filename, int *target_errno)
{
int ret;
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;
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);
{
if (t->to_fileio_unlink != NULL)
{
- int ret = t->to_fileio_unlink (filename, target_errno);
+ int ret = t->to_fileio_unlink (t, filename, target_errno);
if (targetdebug)
fprintf_unfiltered (gdb_stdlog,
/* Unlink FILENAME on the target. Return 0, or -1 if an error
occurs (and set *TARGET_ERRNO). */
- int (*to_fileio_unlink) (const char *filename, int *target_errno);
+ int (*to_fileio_unlink) (struct target_ops *,
+ const char *filename, int *target_errno);
/* Read value of symbolic link FILENAME on the target. Return a
null-terminated string allocated via xmalloc, or NULL if an error