summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-12-06 14:41:41 +0000
committerpeter <peter@FreeBSD.org>1997-12-06 14:41:41 +0000
commit9f0d9f2754cb85cd8d1efafcf76f0099468e8476 (patch)
treef49cd7e3003fda8a3187137a30c4d905489c2364 /usr.bin/truss
parentbb664e8a40da9ef9488025a98e3cd094cd2ad2ec (diff)
downloadFreeBSD-src-9f0d9f2754cb85cd8d1efafcf76f0099468e8476.zip
FreeBSD-src-9f0d9f2754cb85cd8d1efafcf76f0099468e8476.tar.gz
recognize "FreeBSD ELF" as an executable type
close() takes a fd, not a char * :-)
Diffstat (limited to 'usr.bin/truss')
-rw-r--r--usr.bin/truss/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c
index cc8a5b3..90ca0dd 100644
--- a/usr.bin/truss/main.c
+++ b/usr.bin/truss/main.c
@@ -4,7 +4,7 @@
* do a lot of the work :).
*/
/*
- * $Id: main.c,v 1.1 1997/12/06 05:23:03 sef Exp $
+ * $Id: main.c,v 1.2 1997/12/06 14:39:30 peter Exp $
*/
#include <stdio.h>
@@ -50,6 +50,7 @@ struct ex_types {
void (*exit_syscall)(int, int);
} ex_types[] = {
{ "FreeBSD a.out", i386_syscall_entry, i386_syscall_exit },
+ { "FreeBSD ELF", i386_syscall_entry, i386_syscall_exit },
{ "Linux ELF", i386_linux_syscall_entry, i386_linux_syscall_exit },
{ 0, 0, 0 },
};
@@ -73,7 +74,7 @@ set_etype() {
} else {
int len = read(fd, progtype, sizeof(progtype));
progtype[len-1] = '\0';
- close(etype);
+ close(fd);
}
for (funcs = ex_types; funcs->type; funcs++)
OpenPOWER on IntegriCloud