diff options
author | newton <newton@FreeBSD.org> | 1999-02-04 21:21:38 +0000 |
---|---|---|
committer | newton <newton@FreeBSD.org> | 1999-02-04 21:21:38 +0000 |
commit | cea2b66bfe6d852d5c16bb73d75ef25772b8c416 (patch) | |
tree | d4270c0ee8e1fdaeccc12252084b82d901f67568 /sys/i386/ibcs2 | |
parent | 67934ff5c867dfbd8a57d5bf499d3b93a6bf6dcf (diff) | |
download | FreeBSD-src-cea2b66bfe6d852d5c16bb73d75ef25772b8c416.zip FreeBSD-src-cea2b66bfe6d852d5c16bb73d75ef25772b8c416.tar.gz |
Can't use elf_brand_inuse() here because iBCS2 doesn't use ELF. D'oh!
Inlined the same logic elf_brand_inuse() utilizes instead.
Diffstat (limited to 'sys/i386/ibcs2')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_sysvec.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/ibcs2_sysvec.c b/sys/i386/ibcs2/ibcs2_sysvec.c index bc0fa61..9d2efe7 100644 --- a/sys/i386/ibcs2/ibcs2_sysvec.c +++ b/sys/i386/ibcs2/ibcs2_sysvec.c @@ -27,7 +27,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: ibcs2_sysvec.c,v 1.12 1998/12/14 18:53:47 dt Exp $ + * $Id: ibcs2_sysvec.c,v 1.13 1999/01/17 20:39:08 peter Exp $ */ #include <sys/param.h> @@ -35,6 +35,7 @@ #include <sys/module.h> #include <sys/sysent.h> #include <sys/signalvar.h> +#include <sys/proc.h> #include <i386/ibcs2/ibcs2_syscall.h> extern int bsd_to_ibcs2_sig[]; @@ -68,7 +69,18 @@ struct sysentvec ibcs2_svr3_sysvec = { static int ibcs2_modevent(module_t mod, int type, void *unused) { - /* Do not care */ + struct proc *p = NULL; + + switch(type) { + case MOD_UNLOAD: + /* if this was an ELF module we'd use elf_brand_inuse()... */ + for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { + if (p->p_sysent == &ibcs2_svr3_sysvec) + return EBUSY; + } + default: + /* do not care */ + } return 0; } moduledata_t ibcs2_mod = { |