Subject: patch for a.out warnings
To: None <tech-kern@netbsd.org>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: tech-kern
Date: 01/27/2000 23:42:44
For those of you trying to transition to an a.out-less box, and
don't want to do a global find, the following patch will log a
message whenever an a.out binary is executed. I've found this
handy when I feel like upgrading a few programs at a time, rather
than spending a few hours upgrading every blinkin' thing. I just
look at /var/log/messages to see what programs I use daily still
need upgrading.
Just add "options WARN_FOR_AOUT" to your kernel config, and
apply this patch to /sys/kern/exec_aout.c.
Is this worth committing?
Brian
------------------------------------------------------------------------------
--- exec_aout.c Mon Oct 14 11:38:32 1996
+++ exec_aout.c.warn Sun Jan 23 14:25:34 2000
@@ -36,6 +36,7 @@
#include <sys/malloc.h>
#include <sys/vnode.h>
#include <sys/exec.h>
+#include <sys/namei.h>
#include <sys/resourcevar.h>
#include <vm/vm.h>
@@ -86,6 +87,12 @@
if (error)
kill_vmcmds(&epp->ep_vmcmds);
+ else
+#ifdef WARN_FOR_AOUT
+ printf("a.out format: %s\n", epp->ep_ndp->ni_dirp);
+#else
+ ;
+#endif
return error;
}