Suppress repeated empty lines left after automated code removal.
This change was made by filtering every source code file through
"cat -s".
*/
#include "defs.h"
-
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>
# include <asm/sigcontext.h>
#endif])
-
AC_CHECK_DECLS([sys_errlist])
AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>])
AC_CHECK_DECLS([
# define PERSONALITY1_WORDSIZE 4
#endif
-
#if !HAVE_DECL_PTRACE_SETOPTIONS
# define PTRACE_SETOPTIONS 0x4200
#endif
# define PTRACE_EVENT_STOP1 128
#endif
-
#if !defined __GNUC__
# define __attribute__(x) /*nothing*/
#endif
#define printflock printflock64 /* Horrider hack */
#endif
-
static const struct xlat fcntlcmds[] = {
{ F_DUPFD, "F_DUPFD" },
{ F_GETFD, "F_GETFD" },
return 0;
}
-
int
sys_oldselect(struct tcb *tcp)
{
#include <fcntl.h>
-
#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
#endif
# define XATTR_REPLACE 2
#endif
-
#if _LFS64_LARGEFILE
# ifdef HAVE_INTTYPES_H
# include <inttypes.h>
# include <sys/asynch.h>
#endif
-
const struct xlat open_access_modes[] = {
{ O_RDONLY, "O_RDONLY" },
{ O_WRONLY, "O_WRONLY" },
{ 0, NULL },
};
-
#ifndef AT_FDCWD
# define AT_FDCWD -100
#endif
{ 0, NULL },
};
-
#ifndef HAVE_LONG_LONG_OFF_T
static void
realprintstat(struct tcb *tcp, struct stat *statbuf)
tprints("...}");
}
-
static void
printstat(struct tcb *tcp, long addr)
{
newbuf->st_blocks = 0; /* not supported in old_stat */
}
-
static void
printoldstat(struct tcb *tcp, long addr)
{
}
#endif
-
#if defined(LINUXSPARC)
int
return 0;
}
-
int
sys_facl(struct tcb *tcp)
{
return 0;
}
-
static const struct xlat aclipc[] = {
# ifdef IPC_SHM
{ IPC_SHM, "IPC_SHM" },
{ 0, NULL },
};
-
int
sys_aclipc(struct tcb *tcp)
{
#endif /* LINUXSPARC */
-
static const struct xlat fsmagic[] = {
{ 0x73757245, "CODA_SUPER_MAGIC" },
{ 0x012ff7b7, "COH_SUPER_MAGIC" },
{ 0, NULL },
};
-
-
static const char *
sprintfstype(int magic)
{
return decode_mknod(tcp, 1);
}
-
int
sys_fsync(struct tcb *tcp)
{
return 0;
}
-
static void
printdir(struct tcb *tcp, long addr)
{
return 0;
}
-
static const struct xlat direnttypes[] = {
{ DT_UNKNOWN, "DT_UNKNOWN" },
{ DT_FIFO, "DT_FIFO" },
{ 0, NULL },
};
-
int
sys_getdents(struct tcb *tcp)
{
return 0;
}
-
#if _LFS64_LARGEFILE
int
sys_getdents64(struct tcb *tcp)
}
#endif
-
int
sys_getcwd(struct tcb *tcp)
{
return 0;
}
-
#ifdef HAVE_SYS_ASYNCH_H
int
return 0;
}
-
static const struct xlat advise[] = {
{ POSIX_FADV_NORMAL, "POSIX_FADV_NORMAL" },
{ POSIX_FADV_RANDOM, "POSIX_FADV_RANDOM" },
{ 0, NULL }
};
-
int
sys_fadvise64(struct tcb *tcp)
{
return 0;
}
-
int
sys_fadvise64_64(struct tcb *tcp)
{
}
#endif
-
-
-
/* The SH4 ABI does allow long longs in odd-numbered registers, but
does not allow them to be split between registers and memory - and
there are only four argument registers for normal functions. As a
* $Id$
*/
-
#include <stdio.h>
#ifdef STDC_HEADERS
#include "defs.h"
-
# ifdef HAVE_MQUEUE_H
# include <mqueue.h>
# endif
return 0;
}
-
int
sys_mq_open(struct tcb *tcp)
{
>> ioctls.h
}
-
> ioctls.h
lookup_ioctls 03 linux/hdreg.h
# Sort and drop dups?
# sort -u <ioctls.h >ioctls1.h && mv ioctls1.h ioctls.h
-
> ioctldefs.h
# Collect potential ioctl names. ('bases' is a bad name. Sigh)
int nioctls = sizeof(ioctls) / sizeof(ioctls[0]);
-
int compare(const void* a, const void* b) {
unsigned long code1 = ((struct ioctlent *) a)->code;
unsigned long code2 = ((struct ioctlent *) b)->code;
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : strcmp(name1, name2);
}
-
int main(int argc, char** argv) {
int i;
{ 5, TD|TF, sys_linkat, "linkat" }, /* 303 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 304 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 305 */
-
-
-
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 306 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 307 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 308 */
open(SL, ">syscallnum.h") || die "cannot create syscallnum.h\n";
-
-
open(S,$ARGV[1]) || die "cannot open syscall file $ARGV[1]\n";
while (<S>) {
$name = "";
return RVAL_HEX;
}
-
static const struct xlat mmap_prot[] = {
{ PROT_NONE, "PROT_NONE", },
{ PROT_READ, "PROT_READ" },
}
#endif /* _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T */
-
int
sys_munmap(struct tcb *tcp)
{
return 0;
}
-
static const struct xlat mremap_flags[] = {
{ MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
#ifdef MREMAP_FIXED
{ 0, NULL },
};
-
int
sys_madvise(struct tcb *tcp)
{
return 0;
}
-
static const struct xlat mlockall_flags[] = {
#ifdef MCL_CURRENT
{ MCL_CURRENT, "MCL_CURRENT" },
return 0;
}
-
-
#ifdef MS_ASYNC
static const struct xlat mctl_sync[] = {
return 0;
}
-
#define MPOL_DEFAULT 0
#define MPOL_PREFERRED 1
#define MPOL_BIND 2
#define MPOL_MF_MOVE (1<<1)
#define MPOL_MF_MOVE_ALL (1<<2)
-
static const struct xlat policies[] = {
{ MPOL_DEFAULT, "MPOL_DEFAULT" },
{ MPOL_PREFERRED, "MPOL_PREFERRED" },
{ 0, NULL }
};
-
static void
get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err)
{
#define PF_UNSPEC AF_UNSPEC
#endif
-
/* Under Linux these are enums so we can't test for them with ifdef. */
#define IPPROTO_EGP IPPROTO_EGP
#define IPPROTO_PUP IPPROTO_PUP
};
#endif /* defined(AF_PACKET) */
-
void
printsock(struct tcb *tcp, long addr, int addrlen)
{
return 0;
}
-
int
sys_bind(struct tcb *tcp)
{
return 0;
}
-
#ifdef HAVE_STRUCT_OPTHDR
void
* other than test arg[0].
*/
-
if (s->sys_func == sys_dup2 ||
s->sys_func == sys_dup3 ||
s->sys_func == sys_sendfile ||
#include <sys/syscall.h>
#include <signal.h>
-
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
# ifndef PTRACE_PEEKUSR
{ 0, NULL },
};
-
static const char *
unalignctl_string(unsigned int ctl)
{
return buf;
}
-
int
sys_prctl(struct tcb *tcp)
{
}
#endif /* HAVE_PRCTL */
-
int
sys_sethostname(struct tcb *tcp)
{
return 0;
}
-
int
sys_exit(struct tcb *tcp)
{
return 0;
}
-
-
/* defines copied from linux/sched.h since we can't include that
* ourselves (it conflicts with *lots* of libc includes)
*/
return -1;
}
-
int
internal_fork(struct tcb *tcp)
{
return 0;
}
-
-
-
int
sys_vfork(struct tcb *tcp)
{
return 0;
}
-
-
-
int sys_getuid(struct tcb *tcp)
{
if (exiting(tcp))
return 0;
}
-
int
sys_setreuid(struct tcb *tcp)
{
return 0;
}
-
int
sys_setgroups(struct tcb *tcp)
{
return 0;
}
-
-
static void
printargv(struct tcb *tcp, long addr)
{
return 0;
}
-
#if defined(TCB_WAITEXECVE)
int
internal_exec(struct tcb *tcp)
# define WCOREDUMP(status) ((status) & 0200)
#endif
-
#ifndef W_STOPCODE
#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
#endif
return 0;
}
-
-
int
sys_waitpid(struct tcb *tcp)
{
}
#endif
-
static const struct xlat waitid_types[] = {
{ P_PID, "P_PID" },
#ifdef P_PPID
return 0;
}
-
int
sys_alarm(struct tcb *tcp)
{
return 0;
}
-
static const struct xlat ptrace_cmds[] = {
{ PTRACE_TRACEME, "PTRACE_TRACEME" },
{ PTRACE_PEEKTEXT, "PTRACE_PEEKTEXT" },
# endif
# endif /* !defined(many arches) */
-
# ifndef HPPA
{ sizeof(struct user), "sizeof(struct user)" },
# endif
return 0;
}
-
# ifndef FUTEX_CMP_REQUEUE
# define FUTEX_CMP_REQUEUE 4
# endif
}
# endif /* X86_64 */
-
int
sys_getcpu(struct tcb *tcp)
{
#include "defs.h"
-
#include <inttypes.h>
#define SUBCMDMASK 0x00ff
}
#endif /* _LFS64_LARGEFILES || HAVE_LONG_LONG_RLIM_T */
-
static const struct xlat usagewho[] = {
{ RUSAGE_SELF, "RUSAGE_SELF" },
{ RUSAGE_CHILDREN, "RUSAGE_CHILDREN" },
}
#endif /* ALPHA */
-
-
int
sys_sysinfo(struct tcb *tcp)
{
return 0;
}
-
static const struct xlat priorities[] = {
{ PRIO_PROCESS, "PRIO_PROCESS" },
{ PRIO_PGRP, "PRIO_PGRP" },
return 0;
}
-
int
sys_times(struct tcb *tcp)
{
#include <sys/user.h>
#include <fcntl.h>
-
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
# ifndef PTRACE_PEEKUSR
# undef pt_all_user_regs
#endif
-
-
#ifdef IA64
# include <asm/ptrace_offsets.h>
#endif
printsigmask(&ss, rt);
}
-
#ifndef ILL_ILLOPC
#define ILL_ILLOPC 1 /* illegal opcode */
#define ILL_ILLOPN 2 /* illegal operand */
#endif
-
-
static const struct xlat siginfo_codes[] = {
#ifdef SI_KERNEL
{ SI_KERNEL, "SI_KERNEL" },
tprints("}");
}
-
-
-
int
sys_sigsetmask(struct tcb *tcp)
{
return 0;
}
-
-
#ifdef HAVE_SIGACTION
struct old_sigaction {
sigset_t sigset;
struct old_sigaction sa;
-
if (entering(tcp)) {
printsignal(tcp->u_arg[0]);
tprints(", ");
return 0;
}
-
#endif /* HAVE_SIGACTION */
-
int
sys_sigreturn(struct tcb *tcp)
{
{ 0, NULL },
};
-
-
static int
print_stack_t(struct tcb *tcp, unsigned long addr)
{
return 0;
}
-
int
sys_tgkill(struct tcb *tcp)
{
return 0;
}
-
-
int
sys_rt_sigprocmask(struct tcb *tcp)
{
return 0;
}
-
/* Structure describing the action to be taken when a signal arrives. */
struct new_sigaction
{
uint32_t sa_mask[2 * (NSIG / sizeof(long) ? NSIG / sizeof(long) : 1)];
};
-
int
sys_rt_sigaction(struct tcb *tcp)
{
{ 0, NULL }
};
-
static void
print_addr(struct tcb *tcp, long addr, struct ifreq *ifr)
{
# include <asm/ptrace_offsets.h>
#endif
-
extern char **environ;
extern int optind;
extern char *optarg;
-
int debug = 0, followfork = 0;
unsigned int ptrace_setoptions = 0;
/* Which WSTOPSIG(status) value marks syscall traps? */
static volatile int interrupted;
#endif
-
static void
usage(FILE *ofp, int exitval)
{
error_msg_and_die("Out of memory");
}
-
/* Glue for systems without a MMU that cannot provide fork() */
#ifdef HAVE_FORK
# define strace_vforked 0
# define test_ptrace_seize() ((void)0)
# endif
-
/* Noinline: don't want main to have struct utsname permanently on stack */
static void __attribute__ ((noinline))
get_os_release(void)
error_msg_and_die("bug in alloc_tcb");
}
-
static struct tcb *
pid2tcb(int pid)
{
return NULL;
}
-
void
droptcb(struct tcb *tcp)
{
if (debug)
fprintf(stderr, "dropped tcb for pid %d, %d remain\n", tcp->pid, nprocs);
-
if (outfname && followfork > 1 && tcp->outf)
fclose(tcp->outf);
}
}
-
if (!qflag)
fprintf(stderr, "Process %u detached\n", tcp->pid);
return error;
}
-
static void
cleanup(void)
{
#endif /* HAVE_STRSIGNAL */
-
static int
trace(void)
{
return 0;
}
-
void
tprintf(const char *fmt, ...)
{
{ 0, NULL },
};
-
static void
printstrbuf(struct tcb *tcp, struct strbuf *sbp, int getting)
{
}
#endif /* SYS_getpmsg */
-
-
#ifdef HAVE_SYS_POLL_H
static const struct xlat pollflags[] = {
#undef NF
#undef MA
-
/*
* `ioctlent.h' may be generated from `ioctlent.raw' by the auxiliary
* program `ioctlsort', such that the list is sorted by the `code' field.
* in "/usr/include".
*/
-
static const char *const errnoent0[] = {
#include "errnoent.h"
};
int qual_flags2[MAX_QUALS];
#endif
-
const struct sysent *sysent;
const char *const *errnoent;
const char *const *signalent;
}
#endif /* SH */
-
-
-
-
#ifdef SYS_capget
static const struct xlat capabilities[] = {
{ 0, NULL },
};
-
int
sys_capget(struct tcb *tcp)
{
return 0;
}
-
-
#ifdef MIPS
#ifndef __NEW_UTS_LEN
{ 0, NULL, },
};
-
int term_ioctl(struct tcb *tcp, long code, long arg)
{
struct termios tios;
return 0;
}
-
#ifdef ALPHA
int
sys_osf_gettimeofday(struct tcb *tcp)
return 0;
}
-
#ifdef ALPHA
int
sys_osf_getitimer(struct tcb *tcp)
}
#endif
-
static const struct xlat adjtimex_modes[] = {
{ 0, "0" },
#ifdef ADJ_OFFSET
# undef pt_all_user_regs
#endif
-
#if defined(SPARC64)
# undef PTRACE_GETREGS
# define PTRACE_GETREGS PTRACE_GETREGS64
}
}
-
#ifdef HAVE_PROCESS_VM_READV
/* C library supports this, but the kernel might not. */
static bool process_vm_readv_not_supported = 0;
#endif /* end of hack */
-
#define PAGMASK (~(PAGSIZ - 1))
/*
* move `len' bytes of data from process `pid'
return 0;
}
-
void
printcall(struct tcb *tcp)
{
#endif /* architecture */
}
-
/*
* These #if's are huge, please indent them correctly.
* It's easy to get confused otherwise.
*/
-
#include "syscall.h"
#include <sys/syscall.h>