From: Daniel Jacobowitz Date: Thu, 1 Jun 2006 15:53:17 +0000 (+0000) Subject: * gdb/remote.c (remote_download_command): Use FILEIO_O_TRUNC. X-Git-Tag: gdb-csl-symbian-6_4_50_20060226-9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5754f56a80943b0615d7dabf4889955a52b5860;p=thirdparty%2Fbinutils-gdb.git * gdb/remote.c (remote_download_command): Use FILEIO_O_TRUNC. --- 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);