aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-08-03 13:47:35 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-08-03 13:47:35 +0000
commit92fac5ecb0b23133848395b9883f3dede959142e (patch)
tree3639f788342b0592590c1249c755341c327cf462 /binutils
parent48cb2d85819efcb448e7b635e0a5da776f5bfd8c (diff)
downloadgdb-92fac5ecb0b23133848395b9883f3dede959142e.zip
gdb-92fac5ecb0b23133848395b9883f3dede959142e.tar.gz
gdb-92fac5ecb0b23133848395b9883f3dede959142e.tar.bz2
2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10364 * objcopy.c (strip_main): Check return from smart_rename. (copy_main): Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/objcopy.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 7aadd75..8f61f3e 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/10364
+ * objcopy.c (strip_main): Check return from smart_rename.
+ (copy_main): Likewise.
+
2009-07-27 Nick Clifton <nickc@redhat.com>
PR 10413
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 8908b56..b213132 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3014,9 +3014,11 @@ strip_main (int argc, char *argv[])
if (preserve_dates)
set_times (tmpname, &statbuf);
if (output_file != tmpname)
- smart_rename (tmpname, output_file ? output_file : argv[i],
- preserve_dates);
- status = hold_status;
+ status = (smart_rename (tmpname,
+ output_file ? output_file : argv[i],
+ preserve_dates) != 0);
+ if (status == 0)
+ status = hold_status;
}
else
unlink_if_ordinary (tmpname);
@@ -3866,7 +3868,8 @@ copy_main (int argc, char *argv[])
if (preserve_dates)
set_times (tmpname, &statbuf);
if (tmpname != output_filename)
- smart_rename (tmpname, input_filename, preserve_dates);
+ status = (smart_rename (tmpname, input_filename,
+ preserve_dates) != 0);
}
else
unlink_if_ordinary (tmpname);