diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 1997-08-23 15:57:35 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 1997-08-23 15:57:35 +0000 |
| commit | f97c5958a2b8aefea264ad5c662727178dab7b5d (patch) | |
| tree | dc213f304c89e6b3be4e497f8affe966d83cbeb0 /usr.bin/brandelf | |
| parent | 12b72c70a0c98024a7306a99b26eff365dcbf6cb (diff) | |
Notes
Diffstat (limited to 'usr.bin/brandelf')
| -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 4c682d11fcf6..a1218e23f84b 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.1.2.1 1997/02/09 20:38:03 joerg Exp $ + * $Id: brandelf.c,v 1.1.2.2 1997/06/24 06:45:22 charnier Exp $ */ #include <err.h> @@ -67,8 +67,8 @@ main(int argc, char **argv) char buffer[EI_NINDENT]; char string[(EI_NINDENT-EI_SPARE)+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; |
