blob: d21ce7cd4f55d3fe9bbe8086052451d8f2e90a8e [file] [log] [blame]
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001#include "defs.h"
2
Wichert Akkerman2e2553a1999-05-09 00:29:58 +00003#if defined(LINUX)
4
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00005#include <fcntl.h>
6#include <sys/stat.h>
7#include <sys/time.h>
8#include <sys/wait.h>
9#include <sys/resource.h>
10#include <sys/utsname.h>
11#include <sys/user.h>
12#include <sys/syscall.h>
13#include <signal.h>
14#include <linux/module.h>
15
16/* WTA: #define these here: since Debian uses glibc2's includefiles
17 * instead of the kernel includes we miss these otherwise.
18 */
19
20#if !defined(QM_MODULES)
21#define QM_MODULES 1
22#define QM_DEPS 2
23#define QM_REFS 3
24#define QM_SYMBOLS 4
25#define QM_INFO 5
26#endif
27
28static struct xlat which[] = {
29 { 0, "0" },
30 { QM_MODULES, "QM_MODULES" },
31 { QM_DEPS, "QM_DEPS" },
32 { QM_REFS, "QM_REFS" },
33 { QM_SYMBOLS, "QM_SYMBOLS" },
34 { QM_INFO, "QM_INFO" },
35 { 0, NULL },
36};
37
38int
39sys_query_module(tcp)
40struct tcb *tcp;
41{
42
43 if (entering(tcp)) {
44 printstr(tcp, tcp->u_arg[0], -1);
45 tprintf(", ");
46 printxval(which, tcp->u_arg[1], "L_???");
47 tprintf(", ");
48 printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]);
49 tprintf(", %#lx", tcp->u_arg[4]);
50 }
51 return 0;
52}
53
Wichert Akkerman2e2553a1999-05-09 00:29:58 +000054#endif /* LINUX */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000055