linux_util.h (38f1b189cd839bd8aa122ae06cc084810ca1e395) linux_util.h (19e252baebe7a7466b33c27560420b7d95fe294d)
1/*-
2 * Copyright (c) 1994 Christos Zoulas
3 * Copyright (c) 1995 Frank van der Linden
4 * Copyright (c) 1995 Scott Bartram
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 54 unchanged lines hidden (view full) ---

63
64#define LCONVPATHEXIST(td, upath, pathp) LCONVPATH(td, upath, pathp, 0)
65#define LCONVPATHEXIST_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 0, dfd)
66#define LCONVPATHCREAT(td, upath, pathp) LCONVPATH(td, upath, pathp, 1)
67#define LCONVPATHCREAT_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 1, dfd)
68#define LFREEPATH(path) free(path, M_TEMP)
69
70#define DUMMY(s) \
1/*-
2 * Copyright (c) 1994 Christos Zoulas
3 * Copyright (c) 1995 Frank van der Linden
4 * Copyright (c) 1995 Scott Bartram
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 54 unchanged lines hidden (view full) ---

63
64#define LCONVPATHEXIST(td, upath, pathp) LCONVPATH(td, upath, pathp, 0)
65#define LCONVPATHEXIST_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 0, dfd)
66#define LCONVPATHCREAT(td, upath, pathp) LCONVPATH(td, upath, pathp, 1)
67#define LCONVPATHCREAT_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 1, dfd)
68#define LFREEPATH(path) free(path, M_TEMP)
69
70#define DUMMY(s) \
71LIN_SDT_PROBE_DEFINE0(dummy, s, entry); \
72LIN_SDT_PROBE_DEFINE0(dummy, s, not_implemented); \
73LIN_SDT_PROBE_DEFINE1(dummy, s, return, "int"); \
71int \
72linux_ ## s(struct thread *td, struct linux_ ## s ## _args *args) \
73{ \
74 static pid_t pid; \
75 \
74int \
75linux_ ## s(struct thread *td, struct linux_ ## s ## _args *args) \
76{ \
77 static pid_t pid; \
78 \
79 LIN_SDT_PROBE0(dummy, s, entry); \
80 \
76 if (pid != td->td_proc->p_pid) { \
77 linux_msg(td, "syscall %s not implemented", #s); \
81 if (pid != td->td_proc->p_pid) { \
82 linux_msg(td, "syscall %s not implemented", #s); \
83 LIN_SDT_PROBE0(dummy, s, not_implemented); \
78 pid = td->td_proc->p_pid; \
79 }; \
84 pid = td->td_proc->p_pid; \
85 }; \
86 \
87 LIN_SDT_PROBE1(dummy, s, return, ENOSYS); \
80 return (ENOSYS); \
81} \
82struct __hack
83
84void linux_msg(const struct thread *td, const char *fmt, ...)
85 __printflike(2, 3);
86
87struct linux_device_handler {

--- 46 unchanged lines hidden ---
88 return (ENOSYS); \
89} \
90struct __hack
91
92void linux_msg(const struct thread *td, const char *fmt, ...)
93 __printflike(2, 3);
94
95struct linux_device_handler {

--- 46 unchanged lines hidden ---