[fbsd] cvs commit [HEAD] src/sys/sys sysent.h
John Baldwin
jhb at freebsd.org
Thu Aug 24 22:45:34 UTC 2006
On Thursday 24 August 2006 17:49, Jeremie Le Hen wrote:
> John,
>
> On Tue, Aug 15, 2006 at 05:42:14PM +0000, John Baldwin wrote:
> > jhb 2006-08-15 17:42:14 UTC
> >
> > FreeBSD src repository
> >
> > Modified files:
> > sys/sys sysent.h
> > Log:
> > Use SYS_AUE_<syscallname> to include the appropriate audit event identifier
> > for syscalls in kld's, even when compiled into the kernel statically.
> > Note that since this hardcodes the SYS_ prefix SYSCALL_MODULE_HELPER() now
> > only works for native ABI system calls. Those are the only ones that
> > used the macro anyway, and I chose to not require a second argument to the
> > macro to specify the prefix or audit event directly.
>
> I am trying to build a module containing a dummy syscall. It uses
> SYSCALL_MODULE_HELPER() and now fails to build with the following
> error:
> % sys_hello.c:73: error: `AUE_NULL' undeclared here (not in a function)
> % sys_hello.c:73: error: initializer element is not constant
> % sys_hello.c:73: error: (near initialization for `hello_syscall_mod.old_sysent.sy_auevent')
> % sys_hello.c:73: error: initializer element is not constant
> % sys_hello.c:73: error: (near initialization for `hello_syscall_mod.old_sysent')
>
> What am I supposed to do ?
You should have sys/sysproto.h included (you can only use
SYSCALL_MODULE_HELPER for a NOSTD syscall in syscalls.master
as it assumes it can get syscallname_args as well as
SYS_AUE_syscallname both of which are in sys/sysproto.h).
sys/sysproto.h includes the prerequisite header for AUE_NULL.
--
John Baldwin
More information about the cvs-src
mailing list