From d5754f56a80943b0615d7dabf4889955a52b5860 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 1 Jun 2006 15:53:17 +0000 Subject: [PATCH] * gdb/remote.c (remote_download_command): Use FILEIO_O_TRUNC. --- ChangeLog.csl | 4 ++++ gdb/remote.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.csl b/ChangeLog.csl index 727868fa789..0958cc2c1a7 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,7 @@ +2006-06-01 Daniel Jacobowitz + + * gdb/remote.c (remote_download_command): Use FILEIO_O_TRUNC. + 2006-06-01 Daniel Jacobowitz * gdb/remote.c (remote_hostio_parse_result): Check for strtol diff --git a/gdb/remote.c b/gdb/remote.c index 65ada04215d..a1341d7197d 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -6425,8 +6425,9 @@ remote_download_command (char *args, int from_tty) perror_with_name (argv[0]); make_cleanup (fclose_cleanup, file); - fd = remote_hostio_open (argv[1], FILEIO_O_WRONLY | FILEIO_O_CREAT, 0700, - &remote_errno); + fd = remote_hostio_open (argv[1], (FILEIO_O_WRONLY | FILEIO_O_CREAT + | FILEIO_O_TRUNC), + 0700, &remote_errno); if (fd == -1) remote_hostio_error (remote_errno); -- 2.47.2