/* * ausysvcall.c - A program that lets you map syscall names and numbers * Copyright (c) 2008 Red Hat Inc., Durham, North Carolina. * All Rights Reserved. * * This software may be freely redistributed and/or modified under the * terms of the GNU General Public License as published by the Free * Software Foundation; either version 2, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to the * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Authors: * Steve Grubb */ #include #include #include #include #include "libaudit.h" #define LAST_SYSCALL 1400 // IA64 is in the 1300's right now void usage(void) { fprintf(stderr, "usage: ausyscall [arch] name | number | --dump | --exact\n"); exit(1); } int main(int argc, char *argv[]) { int i, rc; int machine=-1, syscall_num=-1, dump=0, exact=0; const char *name = NULL; if (argc > 4) { fputs("Too many arguments\n", stderr); usage(); } else if (argc < 2) usage(); for (i=1; i