Deleted Added
full compact
amd64-linux32.c (86501) amd64-linux32.c (87703)
1/*
2 * Copryight 1997 Sean Eric Fagan
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#ifndef lint
33static const char rcsid[] =
1/*
2 * Copryight 1997 Sean Eric Fagan
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#ifndef lint
33static const char rcsid[] =
34 "$FreeBSD: head/usr.bin/truss/amd64-linux32.c 86501 2001-11-17 17:18:36Z des $";
34 "$FreeBSD: head/usr.bin/truss/amd64-linux32.c 87703 2001-12-11 23:34:02Z markm $";
35#endif /* not lint */
36
37/*
38 * Linux/i386-specific system call handling. Given how much of this code
39 * is taken from the freebsd equivalent, I can probably put even more of
40 * it in support routines that can be used by any personality support.
41 */
42

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

50#include <errno.h>
51#include <fcntl.h>
52#include <signal.h>
53#include <stdio.h>
54#include <stdlib.h>
55#include <string.h>
56#include <unistd.h>
57
35#endif /* not lint */
36
37/*
38 * Linux/i386-specific system call handling. Given how much of this code
39 * is taken from the freebsd equivalent, I can probably put even more of
40 * it in support routines that can be used by any personality support.
41 */
42

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

50#include <errno.h>
51#include <fcntl.h>
52#include <signal.h>
53#include <stdio.h>
54#include <stdlib.h>
55#include <string.h>
56#include <unistd.h>
57
58#include "extern.h"
58#include "syscall.h"
59
60static int fd = -1;
61static int cpid = -1;
62extern int Procfd;
63
64extern FILE *outfile;
65#include "linux_syscalls.h"

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

178 }
179
180 return;
181}
182
183/*
184 * Linux syscalls return negative errno's, we do positive and map them
185 */
59#include "syscall.h"
60
61static int fd = -1;
62static int cpid = -1;
63extern int Procfd;
64
65extern FILE *outfile;
66#include "linux_syscalls.h"

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

179 }
180
181 return;
182}
183
184/*
185 * Linux syscalls return negative errno's, we do positive and map them
186 */
186int bsd_to_linux_errno[] = {
187const int bsd_to_linux_errno[] = {
187 -0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
188 -10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
189 -20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
190 -30, -31, -32, -33, -34, -11,-115,-114, -88, -89,
191 -90, -91, -92, -93, -94, -95, -96, -97, -98, -99,
192 -100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
193 -110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
194 -116, -66, -6, -6, -6, -6, -6, -37, -38, -9,

--- 59 unchanged lines hidden ---
188 -0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
189 -10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
190 -20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
191 -30, -31, -32, -33, -34, -11,-115,-114, -88, -89,
192 -90, -91, -92, -93, -94, -95, -96, -97, -98, -99,
193 -100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
194 -110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
195 -116, -66, -6, -6, -6, -6, -6, -37, -38, -9,

--- 59 unchanged lines hidden ---