diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 1997-08-23 15:51:14 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 1997-08-23 15:51:14 +0000 |
| commit | 6fe3822809c68fea61bd6b125db9bbff47f90a5d (patch) | |
| tree | 5d2138201e81eb7b6494b3745058aaa49317e92f | |
| parent | 3511ae5bba0cd28138269c37eedc15db5d286961 (diff) | |
Notes
| -rw-r--r-- | usr.bin/brandelf/brandelf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/brandelf/brandelf.c b/usr.bin/brandelf/brandelf.c index 86519aacb381..79970e88a5db 100644 --- a/usr.bin/brandelf/brandelf.c +++ b/usr.bin/brandelf/brandelf.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: brandelf.c,v 1.6 1997/05/21 23:07:17 jdp Exp $ + * $Id: brandelf.c,v 1.7 1997/06/23 06:47:12 charnier Exp $ */ #include <elf.h> @@ -67,8 +67,8 @@ main(int argc, char **argv) char buffer[EI_NIDENT]; char string[(EI_NIDENT-EI_BRAND)+1]; - if ((fd = open(argv[0], O_RDWR, 0)) < 0) { - warnx("no such file %s", argv[0]); + if ((fd = open(argv[0], change? O_RDWR: O_RDONLY, 0)) < 0) { + warn("error opening file %s", argv[0]); retval = 1; goto fail; |
