linux_file.c (144987) | linux_file.c (156842) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 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 --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 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 --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_file.c 144987 2005-04-13 04:31:43Z mdodd $"); | 30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_file.c 156842 2006-03-18 18:20:17Z netchild $"); |
31 32#include "opt_compat.h" 33#include "opt_mac.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/conf.h> 38#include <sys/dirent.h> --- 10 unchanged lines hidden (view full) --- 49#include <sys/sysproto.h> 50#include <sys/tty.h> 51#include <sys/vnode.h> 52 53#include <ufs/ufs/extattr.h> 54#include <ufs/ufs/quota.h> 55#include <ufs/ufs/ufsmount.h> 56 | 31 32#include "opt_compat.h" 33#include "opt_mac.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/conf.h> 38#include <sys/dirent.h> --- 10 unchanged lines hidden (view full) --- 49#include <sys/sysproto.h> 50#include <sys/tty.h> 51#include <sys/vnode.h> 52 53#include <ufs/ufs/extattr.h> 54#include <ufs/ufs/quota.h> 55#include <ufs/ufs/ufsmount.h> 56 |
57#include "opt_compat.h" 58 | |
59#ifdef COMPAT_LINUX32 60#include <machine/../linux32/linux.h> 61#include <machine/../linux32/linux32_proto.h> 62#else 63#include <machine/../linux/linux.h> 64#include <machine/../linux/linux_proto.h> 65#endif 66#include <compat/linux/linux_util.h> --- 597 unchanged lines hidden (view full) --- 664#endif 665 666 error = kern_truncate(td, path, UIO_SYSSPACE, args->length); 667 LFREEPATH(path); 668 return (error); 669} 670 671int | 57#ifdef COMPAT_LINUX32 58#include <machine/../linux32/linux.h> 59#include <machine/../linux32/linux32_proto.h> 60#else 61#include <machine/../linux/linux.h> 62#include <machine/../linux/linux_proto.h> 63#endif 64#include <compat/linux/linux_util.h> --- 597 unchanged lines hidden (view full) --- 662#endif 663 664 error = kern_truncate(td, path, UIO_SYSSPACE, args->length); 665 LFREEPATH(path); 666 return (error); 667} 668 669int |
670linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args) 671{ 672 struct ftruncate_args /* { 673 int fd; 674 int pad; 675 off_t length; 676 } */ nuap; 677 678 nuap.fd = args->fd; 679 nuap.pad = 0; 680 nuap.length = args->length; 681 return (ftruncate(td, &nuap)); 682} 683 684int |
|
672linux_link(struct thread *td, struct linux_link_args *args) 673{ 674 char *path, *to; 675 int error; 676 677 LCONVPATHEXIST(td, args->path, &path); 678 /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ 679 error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1); --- 486 unchanged lines hidden --- | 685linux_link(struct thread *td, struct linux_link_args *args) 686{ 687 char *path, *to; 688 int error; 689 690 LCONVPATHEXIST(td, args->path, &path); 691 /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ 692 error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1); --- 486 unchanged lines hidden --- |