Deleted Added
full compact
procfs.c (123247) procfs.c (124219)
1/*
2 * Copyright (c) 2001 Dag-Erling Sm�rgrav
3 * Copyright (c) 1993 Jan-Simon Pendry
4 * Copyright (c) 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Jan-Simon Pendry.

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

32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95
39 *
1/*
2 * Copyright (c) 2001 Dag-Erling Sm�rgrav
3 * Copyright (c) 1993 Jan-Simon Pendry
4 * Copyright (c) 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Jan-Simon Pendry.

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

32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95
39 *
40 * $FreeBSD: head/sys/fs/procfs/procfs.c 123247 2003-12-07 17:40:00Z des $
40 * $FreeBSD: head/sys/fs/procfs/procfs.c 124219 2004-01-07 17:58:51Z rwatson $
41 */
42
43#include <sys/param.h>
44#include <sys/queue.h>
45#include <sys/exec.h>
46#include <sys/lock.h>
47#include <sys/kernel.h>
48#include <sys/malloc.h>

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

65 * Filler function for proc/pid/self
66 */
67int
68procfs_doprocfile(PFS_FILL_ARGS)
69{
70 char *fullpath = "unknown";
71 char *freepath = NULL;
72
41 */
42
43#include <sys/param.h>
44#include <sys/queue.h>
45#include <sys/exec.h>
46#include <sys/lock.h>
47#include <sys/kernel.h>
48#include <sys/malloc.h>

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

65 * Filler function for proc/pid/self
66 */
67int
68procfs_doprocfile(PFS_FILL_ARGS)
69{
70 char *fullpath = "unknown";
71 char *freepath = NULL;
72
73 vn_lock(p->p_textvp, LK_EXCLUSIVE | LK_RETRY, td);
73 vn_fullpath(td, p->p_textvp, &fullpath, &freepath);
74 vn_fullpath(td, p->p_textvp, &fullpath, &freepath);
75 VOP_UNLOCK(p->p_textvp, 0, td);
74 sbuf_printf(sb, "%s", fullpath);
75 if (freepath)
76 free(freepath, M_TEMP);
77 return (0);
78}
79
80/*
81 * Filler function for proc/curproc

--- 118 unchanged lines hidden ---
76 sbuf_printf(sb, "%s", fullpath);
77 if (freepath)
78 free(freepath, M_TEMP);
79 return (0);
80}
81
82/*
83 * Filler function for proc/curproc

--- 118 unchanged lines hidden ---