subr_ndis.c (257176) | subr_ndis.c (285391) |
---|---|
1/*- 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. 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 --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. 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 --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/compat/ndis/subr_ndis.c 257176 2013-10-26 17:58:36Z glebius $"); | 34__FBSDID("$FreeBSD: head/sys/compat/ndis/subr_ndis.c 285391 2015-07-11 16:22:48Z mjg $"); |
35 36/* 37 * This file implements a translation layer between the BSD networking 38 * infrasturcture and Windows(R) NDIS network driver modules. A Windows 39 * NDIS driver calls into several functions in the NDIS.SYS Windows 40 * kernel module and exports a table of functions designed to be called 41 * by the NDIS subsystem. Using the PE loader, we can patch our own 42 * versions of the NDIS routines into a given Windows driver module and --- 2769 unchanged lines hidden (view full) --- 2812 *status = NDIS_STATUS_RESOURCES; 2813 return; 2814 } 2815 2816 snprintf(path, MAXPATHLEN, "%s/%s", ndis_filepath, afilename); 2817 2818 /* Some threads don't have a current working directory. */ 2819 | 35 36/* 37 * This file implements a translation layer between the BSD networking 38 * infrasturcture and Windows(R) NDIS network driver modules. A Windows 39 * NDIS driver calls into several functions in the NDIS.SYS Windows 40 * kernel module and exports a table of functions designed to be called 41 * by the NDIS subsystem. Using the PE loader, we can patch our own 42 * versions of the NDIS routines into a given Windows driver module and --- 2769 unchanged lines hidden (view full) --- 2812 *status = NDIS_STATUS_RESOURCES; 2813 return; 2814 } 2815 2816 snprintf(path, MAXPATHLEN, "%s/%s", ndis_filepath, afilename); 2817 2818 /* Some threads don't have a current working directory. */ 2819 |
2820 if (td->td_proc->p_fd->fd_rdir == NULL) 2821 td->td_proc->p_fd->fd_rdir = rootvnode; 2822 if (td->td_proc->p_fd->fd_cdir == NULL) 2823 td->td_proc->p_fd->fd_cdir = rootvnode; | 2820 pwd_ensure_dirs(); |
2824 2825 NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); 2826 2827 flags = FREAD; 2828 error = vn_open(&nd, &flags, 0, NULL); 2829 if (error) { 2830 *status = NDIS_STATUS_FILE_NOT_FOUND; 2831 ExFreePool(fh); --- 541 unchanged lines hidden --- | 2821 2822 NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); 2823 2824 flags = FREAD; 2825 error = vn_open(&nd, &flags, 0, NULL); 2826 if (error) { 2827 *status = NDIS_STATUS_FILE_NOT_FOUND; 2828 ExFreePool(fh); --- 541 unchanged lines hidden --- |