Deleted Added
full compact
linux_util.h (159992) linux_util.h (168014)
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

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

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp
30 * from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp
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

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

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp
30 * from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp
31 * $FreeBSD: head/sys/compat/linux/linux_util.h 159992 2006-06-27 18:30:49Z jhb $
31 * $FreeBSD: head/sys/compat/linux/linux_util.h 168014 2007-03-29 02:11:46Z julian $
32 */
33
34/*
35 * This file is pretty much the same as Christos' svr4_util.h
36 * (for now).
37 */
38
39#ifndef _LINUX_UTIL_H_

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

48#include <sys/syslog.h>
49#include <sys/cdefs.h>
50#include <sys/uio.h>
51
52extern const char linux_emul_path[];
53
54int linux_emul_convpath(struct thread *, char *, enum uio_seg, char **, int);
55
32 */
33
34/*
35 * This file is pretty much the same as Christos' svr4_util.h
36 * (for now).
37 */
38
39#ifndef _LINUX_UTIL_H_

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

48#include <sys/syslog.h>
49#include <sys/cdefs.h>
50#include <sys/uio.h>
51
52extern const char linux_emul_path[];
53
54int linux_emul_convpath(struct thread *, char *, enum uio_seg, char **, int);
55
56#define LCONVPATH(td, upath, pathp, i) \
56#define LCONVPATH_SEG(td, upath, pathp, i, seg) \
57 do { \
58 int _error; \
59 \
57 do { \
58 int _error; \
59 \
60 _error = linux_emul_convpath(td, upath, UIO_USERSPACE, \
60 _error = linux_emul_convpath(td, upath, seg, \
61 pathp, i); \
62 if (*(pathp) == NULL) \
63 return (_error); \
64 } while (0)
65
61 pathp, i); \
62 if (*(pathp) == NULL) \
63 return (_error); \
64 } while (0)
65
66#define LCONVPATH(td, upath, pathp, i) \
67 LCONVPATH_SEG(td, upath, pathp, i, UIO_USERSPACE)
68
66#define LCONVPATHEXIST(td, upath, pathp) LCONVPATH(td, upath, pathp, 0)
67#define LCONVPATHCREAT(td, upath, pathp) LCONVPATH(td, upath, pathp, 1)
68#define LFREEPATH(path) free(path, M_TEMP)
69
70#define DUMMY(s) \
71int \
72linux_ ## s(struct thread *td, struct linux_ ## s ## _args *args) \
73{ \

--- 31 unchanged lines hidden ---
69#define LCONVPATHEXIST(td, upath, pathp) LCONVPATH(td, upath, pathp, 0)
70#define LCONVPATHCREAT(td, upath, pathp) LCONVPATH(td, upath, pathp, 1)
71#define LFREEPATH(path) free(path, M_TEMP)
72
73#define DUMMY(s) \
74int \
75linux_ ## s(struct thread *td, struct linux_ ## s ## _args *args) \
76{ \

--- 31 unchanged lines hidden ---