summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-07-13 19:36:59 +0000
committerphk <phk@FreeBSD.org>2004-07-13 19:36:59 +0000
commitb0e68741889ab66096103a2dec2219bbde3c21c6 (patch)
treed2eb15e6477b3d5e7e1f7c49c1e2eed3b85ec318 /sys/compat
parent7b891087ed78b2c7943c2503f0bfdd7678a6d65c (diff)
downloadFreeBSD-src-b0e68741889ab66096103a2dec2219bbde3c21c6.zip
FreeBSD-src-b0e68741889ab66096103a2dec2219bbde3c21c6.tar.gz
Give kldunload a -f(orce) argument.
Add a MOD_QUIESCE event for modules. This should return error (EBUSY) of the module is in use. MOD_UNLOAD should now only fail if it is impossible (as opposed to inconvenient) to unload the module. Valid reasons are memory references into the module which cannot be tracked down and eliminated. When kldunloading, we abandon if MOD_UNLOAD fails, and if -force is not given, MOD_QUIESCE failing will also prevent the unload. For backwards compatibility, we treat EOPNOTSUPP from MOD_QUIESCE as success. Document that modules should return EOPNOTSUPP for unknown events.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_proto.h7
-rw-r--r--sys/compat/freebsd32/freebsd32_syscall.h5
-rw-r--r--sys/compat/freebsd32/freebsd32_syscalls.c3
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c3
4 files changed, 13 insertions, 5 deletions
diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h
index 79fc978..acebc69 100644
--- a/sys/compat/freebsd32/freebsd32_proto.h
+++ b/sys/compat/freebsd32/freebsd32_proto.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.38 2004/07/02 00:35:52 marcel Exp
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.39 2004/07/13 19:35:11 phk Exp
*/
#ifndef _FREEBSD32_SYSPROTO_H_
@@ -205,6 +205,10 @@ struct freebsd32_sigaction_args {
struct freebsd32_sigreturn_args {
char sigcntxp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd32_ucontext *)];
};
+struct kldunloadf_args {
+ char fileid_l_[PADL_(int)]; int fileid; char fileid_r_[PADR_(int)];
+ char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+};
int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *);
int freebsd32_sigaltstack(struct thread *, struct freebsd32_sigaltstack_args *);
int freebsd32_execve(struct thread *, struct freebsd32_execve_args *);
@@ -235,6 +239,7 @@ int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *);
int freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *);
int freebsd32_sigaction(struct thread *, struct freebsd32_sigaction_args *);
int freebsd32_sigreturn(struct thread *, struct freebsd32_sigreturn_args *);
+int kldunloadf(struct thread *, struct kldunloadf_args *);
#ifdef COMPAT_43
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index 524e783..72fe352 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.38 2004/07/02 00:35:52 marcel Exp
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.39 2004/07/13 19:35:11 phk Exp
*/
#define FREEBSD32_SYS_syscall 0
@@ -301,4 +301,5 @@
#define FREEBSD32_SYS_jail_attach 436
#define FREEBSD32_SYS_thr_suspend 442
#define FREEBSD32_SYS_thr_wake 443
-#define FREEBSD32_SYS_MAXSYSCALL 444
+#define FREEBSD32_SYS_kldunloadf 444
+#define FREEBSD32_SYS_MAXSYSCALL 445
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c
index 6d73c55..291f8c4 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.38 2004/07/02 00:35:52 marcel Exp
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.39 2004/07/13 19:35:11 phk Exp
*/
const char *freebsd32_syscallnames[] = {
@@ -451,4 +451,5 @@ const char *freebsd32_syscallnames[] = {
"#441", /* 441 = ksem_timedwait */
"thr_suspend", /* 442 = thr_suspend */
"thr_wake", /* 443 = thr_wake */
+ "kldunloadf", /* 444 = kldunloadf */
};
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index dc4fd10..26144c6 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.38 2004/07/02 00:35:52 marcel Exp
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.39 2004/07/13 19:35:11 phk Exp
*/
#include "opt_compat.h"
@@ -469,4 +469,5 @@ struct sysent freebsd32_sysent[] = {
{ 0, (sy_call_t *)nosys }, /* 441 = ksem_timedwait */
{ SYF_MPSAFE | AS(thr_suspend_args), (sy_call_t *)thr_suspend }, /* 442 = thr_suspend */
{ SYF_MPSAFE | AS(thr_wake_args), (sy_call_t *)thr_wake }, /* 443 = thr_wake */
+ { SYF_MPSAFE | AS(kldunloadf_args), (sy_call_t *)kldunloadf }, /* 444 = kldunloadf */
};
OpenPOWER on IntegriCloud