2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # T2 SDE: package/.../binutils/300-006_better_file_error.patch.uclibc
6 # Copyright (C) 2004 - 2016 The T2 SDE Project
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
16 # --- T2-COPYRIGHT-NOTE-END ---
18 ## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
20 ## All lines beginning with `## DP:' are a description of the patch.
21 ## DP: Specify which filename is causing an error if the filename is a
22 ## DP: directory. (#45832)
25 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
29 [ -f debian
/patches
/00patch-opts
] && . debian
/patches
/00patch-opts
30 patch_opts
="${patch_opts:--f --no-backup-if-mismatch}"
33 -patch) patch $patch_opts -p1 < $0;;
34 -unpatch) patch $patch_opts -p1 -R < $0;;
36 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
43 diff -urNad /home
/james
/debian
/packages
/binutils
/binutils-2.14
.90.0.6/bfd
/opncls.c binutils-2.14
.90.0.6/bfd
/opncls.c
44 --- /home
/james
/debian
/packages
/binutils
/binutils-2.14
.90.0.6/bfd
/opncls.c
2003-07-23 16:08:09.000000000 +0100
45 +++ binutils-2.14
.90.0.6/bfd
/opncls.c
2003-09-10 22:35:00.000000000 +0100
49 const bfd_target
*target_vec
;
52 + if (stat
(filename
, &s
) == 0)
53 + if (S_ISDIR
(s.st_mode
)) {
54 + bfd_set_error
(bfd_error_file_not_recognized
);
58 nbfd
= _bfd_new_bfd
();