Deleted Added
full compact
freebsd32_misc.c (315471) freebsd32_misc.c (315548)
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: stable/11/sys/compat/freebsd32/freebsd32_misc.c 315471 2017-03-18 03:55:29Z kib $");
28__FBSDID("$FreeBSD: stable/11/sys/compat/freebsd32/freebsd32_misc.c 315548 2017-03-19 14:12:55Z trasz $");
29
30#include "opt_compat.h"
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#define __ELF_WORD_SIZE 32
35
36#include <sys/param.h>

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

1502 ap.path = uap->path;
1503 ap.length = PAIR32TO64(off_t,uap->length);
1504 return (sys_truncate(td, &ap));
1505}
1506
1507int
1508freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap)
1509{
29
30#include "opt_compat.h"
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#define __ELF_WORD_SIZE 32
35
36#include <sys/param.h>

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

1502 ap.path = uap->path;
1503 ap.length = PAIR32TO64(off_t,uap->length);
1504 return (sys_truncate(td, &ap));
1505}
1506
1507int
1508freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap)
1509{
1510 struct ftruncate_args ap;
1511
1510
1512 ap.fd = uap->fd;
1513 ap.length = PAIR32TO64(off_t,uap->length);
1514 return (sys_ftruncate(td, &ap));
1511 return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length)));
1515}
1516
1517#ifdef COMPAT_43
1518int
1519ofreebsd32_getdirentries(struct thread *td,
1520 struct ofreebsd32_getdirentries_args *uap)
1521{
1522 struct ogetdirentries_args ap;

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

1608 ap.path = uap->path;
1609 ap.length = PAIR32TO64(off_t,uap->length);
1610 return (sys_truncate(td, &ap));
1611}
1612
1613int
1614freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftruncate_args *uap)
1615{
1512}
1513
1514#ifdef COMPAT_43
1515int
1516ofreebsd32_getdirentries(struct thread *td,
1517 struct ofreebsd32_getdirentries_args *uap)
1518{
1519 struct ogetdirentries_args ap;

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

1605 ap.path = uap->path;
1606 ap.length = PAIR32TO64(off_t,uap->length);
1607 return (sys_truncate(td, &ap));
1608}
1609
1610int
1611freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftruncate_args *uap)
1612{
1616 struct ftruncate_args ap;
1617
1613
1618 ap.fd = uap->fd;
1619 ap.length = PAIR32TO64(off_t,uap->length);
1620 return (sys_ftruncate(td, &ap));
1614 return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length)));
1621}
1622#endif /* COMPAT_FREEBSD6 */
1623
1624struct sf_hdtr32 {
1625 uint32_t headers;
1626 int hdr_cnt;
1627 uint32_t trailers;
1628 int trl_cnt;

--- 1534 unchanged lines hidden ---
1615}
1616#endif /* COMPAT_FREEBSD6 */
1617
1618struct sf_hdtr32 {
1619 uint32_t headers;
1620 int hdr_cnt;
1621 uint32_t trailers;
1622 int trl_cnt;

--- 1534 unchanged lines hidden ---