]> code.ossystems Code Review - openembedded-core.git/blob
4461bedd4ea2bc9b5d8ce965f0c20ffd508a0f88
[openembedded-core.git] /
1 # strip (and objcopy) fail to set the error code if there is no
2 # output file name and the rename of the stripped (or copied) file
3 # fails, yet the command fails to do anything.  This fixes both
4 # objcopy and strip.
5 #
6 # modification by bero: Ported to 2.16.91.0.6
7 #
8 #Signed-off-by: John Bowler <jbowler@acm.org>
9 #Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
10 --- binutils-2.16.91.0.6/binutils/objcopy.c.ark 2006-03-11 15:59:07.000000000 +0100
11 +++ binutils-2.16.91.0.6/binutils/objcopy.c     2006-03-11 15:59:45.000000000 +0100
12 @@ -2593,7 +2593,8 @@
13           if (preserve_dates)
14             set_times (tmpname, &statbuf);
15           if (output_file == NULL)
16 -           smart_rename (tmpname, argv[i], preserve_dates);
17 +           if(smart_rename (tmpname, argv[i], preserve_dates))
18 +              hold_status = 1;
19           status = hold_status;
20         }
21        else
22 @@ -3184,7 +3185,8 @@
23         {
24           if (preserve_dates)
25             set_times (tmpname, &statbuf);
26 -         smart_rename (tmpname, input_filename, preserve_dates);
27 +         if (smart_rename (tmpname, input_filename, preserve_dates))
28 +            status = 1;
29         }
30        else
31         unlink (tmpname);