Re: Using "query_module"

From: Keith Owens (kaos@ocs.com.au)
Date: Mon Feb 04 2002 - 05:20:09 EST


On Mon, 4 Feb 2002 12:04:19 +0200 ,
"Vlodavsky, Zvi" <zvi.vlodavsky@intel.com> wrote:
>Please personally CC me with responses on this posting:
>I would like to use the "query_module" system call with the QM_SYMBOLS flag
>in an application, but I am not sure of what the appropriate way of doing it
>is, and whether it is safe.

query_module(NULL, 0, NULL, 0, NULL) returns 0 if the kernel supports
query_module, -ENOSYS if it does not.

If the kernel supports query_module,
  query_module(NULL, -1, NULL, 0, NULL)
returns -ENOSYS if the kernel has been compiled without modules,
-EINVAL if the kernel was compiled with module support.

Grab the modutils source and see utils/modstat.c::new_get_kernel_info,
it uses all the query_module facilities.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:32 EST