linux_util.c (108541) | linux_util.c (109623) |
---|---|
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 --- 13 unchanged lines hidden (view full) --- 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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.c,v 1.5 1995/01/22 23:44:50 christos 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 --- 13 unchanged lines hidden (view full) --- 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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.c,v 1.5 1995/01/22 23:44:50 christos Exp |
30 * $FreeBSD: head/sys/compat/linux/linux_util.c 108541 2003-01-02 02:19:10Z alfred $ | 30 * $FreeBSD: head/sys/compat/linux/linux_util.c 109623 2003-01-21 08:56:16Z alfred $ |
31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/namei.h> 36#include <sys/proc.h> 37#include <sys/malloc.h> 38#include <sys/vnode.h> --- 57 unchanged lines hidden (view full) --- 96 struct nameidata ndroot; 97 struct vattr vat; 98 struct vattr vatroot; 99 int error; 100 const char *prefix; 101 char *ptr, *buf, *cp; 102 size_t len, sz; 103 | 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/namei.h> 36#include <sys/proc.h> 37#include <sys/malloc.h> 38#include <sys/vnode.h> --- 57 unchanged lines hidden (view full) --- 96 struct nameidata ndroot; 97 struct vattr vat; 98 struct vattr vatroot; 99 int error; 100 const char *prefix; 101 char *ptr, *buf, *cp; 102 size_t len, sz; 103 |
104 buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); | 104 buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0); |
105 *pbuf = buf; 106 107 prefix = linux_emul_path; 108 for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++) 109 continue; 110 sz = MAXPATHLEN - (ptr - buf); 111 112 if (pathseg == UIO_SYSSPACE) --- 106 unchanged lines hidden --- | 105 *pbuf = buf; 106 107 prefix = linux_emul_path; 108 for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++) 109 continue; 110 sz = MAXPATHLEN - (ptr - buf); 111 112 if (pathseg == UIO_SYSSPACE) --- 106 unchanged lines hidden --- |