mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
libsysdecode: Decode linux_clone syscall flags
Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40150 MFC after: 1 week
This commit is contained in:
parent
3f1bfc136f
commit
bd35e83bcf
|
@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
|
|||
|
||||
#include <compat/linux/linux.h>
|
||||
#include <compat/linux/linux_file.h>
|
||||
#include <compat/linux/linux_fork.h>
|
||||
#include <compat/linux/linux_time.h>
|
||||
|
||||
#define X(a,b) { a, #b },
|
||||
|
@ -240,3 +241,20 @@ sysdecode_linux_open_flags(FILE *fp, int flags, int *rem)
|
|||
*rem = val | mode;
|
||||
return (printed);
|
||||
}
|
||||
|
||||
bool
|
||||
sysdecode_linux_clone_flags(FILE *fp, int flags, int *rem)
|
||||
{
|
||||
uintmax_t val;
|
||||
bool printed;
|
||||
int sig;
|
||||
|
||||
sig = flags & LINUX_CSIGNAL;
|
||||
if (sig != 0)
|
||||
fprintf(fp, "(%s)", sysdecode_linux_signal(sig));
|
||||
val = (unsigned)flags & ~LINUX_CSIGNAL;
|
||||
print_mask_part(fp, cloneflags, &val, &printed);
|
||||
if (rem != NULL)
|
||||
*rem = val;
|
||||
return (printed);
|
||||
}
|
||||
|
|
|
@ -94,6 +94,7 @@ gen_table "clockflags" "LINUX_TIMER_[A-Z_]+[[:space:]]+0x[0-9]+" "compat
|
|||
gen_table "clockcpuids" "LINUX_CPUCLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_time.h" "_MASK|_MAX"
|
||||
gen_table "openflags" "LINUX_O_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_file.h" "O_RDONLY|O_RDWR|O_WRONLY|O_ACCMODE"
|
||||
gen_table "sigprocmaskhow" "LINUX_SIG_[A-Z]+[[:space:]]+[0-9]+" "compat/linux/linux.h"
|
||||
gen_table "cloneflags" "LINUX_CLONE_[A-Z_]+[[:space:]]+[[:alnum:]]+" "compat/linux/linux_fork.h" "LINUX_CLONE_LEGACY_FLAGS|LINUX_CLONE_CLEAR_SIGHAND|LINUX_CLONE_INTO_CGROUP|LINUX_CLONE_NEWTIME"
|
||||
|
||||
# Generate a .depend file for our output file
|
||||
if [ -n "$output_file" ]; then
|
||||
|
|
|
@ -142,6 +142,7 @@ bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem);
|
|||
bool sysdecode_linux_atflags(FILE *_fp, int _flag, int *_rem);
|
||||
void sysdecode_linux_clockid(FILE *_fp, clockid_t _which);
|
||||
bool sysdecode_linux_clock_flags(FILE *_fp, int _flags, int *_rem);
|
||||
bool sysdecode_linux_clone_flags(FILE *_fp, int _flags, int *_rem);
|
||||
bool sysdecode_linux_open_flags(FILE *_fp, int _flags, int *_rem);
|
||||
const char *sysdecode_linux_signal(int _sig);
|
||||
const char *sysdecode_linux_sigprocmask_how(int _how);
|
||||
|
|
Loading…
Reference in a new issue