Deleted Added
full compact
nfs.c (59766) nfs.c (59824)
1/* $FreeBSD: head/lib/libstand/nfs.c 59766 2000-04-29 20:47:10Z jlemon $ */
1/* $FreeBSD: head/lib/libstand/nfs.c 59824 2000-05-01 10:53:21Z ps $ */
2/* $NetBSD: nfs.c,v 1.2 1998/01/24 12:43:09 drochner Exp $ */
3
4/*-
5 * Copyright (c) 1993 John Brezak
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

104 */
105int nfs_open(const char *path, struct open_file *f);
106static int nfs_close(struct open_file *f);
107static int nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
108static int nfs_write(struct open_file *f, void *buf, size_t size, size_t *resid);
109static off_t nfs_seek(struct open_file *f, off_t offset, int where);
110static int nfs_stat(struct open_file *f, struct stat *sb);
111
2/* $NetBSD: nfs.c,v 1.2 1998/01/24 12:43:09 drochner Exp $ */
3
4/*-
5 * Copyright (c) 1993 John Brezak
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

104 */
105int nfs_open(const char *path, struct open_file *f);
106static int nfs_close(struct open_file *f);
107static int nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
108static int nfs_write(struct open_file *f, void *buf, size_t size, size_t *resid);
109static off_t nfs_seek(struct open_file *f, off_t offset, int where);
110static int nfs_stat(struct open_file *f, struct stat *sb);
111
112static struct nfs_iodesc nfs_root_node;
113
112struct fs_ops nfs_fsops = {
113 "nfs",
114 nfs_open,
115 nfs_close,
116 nfs_read,
117 nfs_write,
118 nfs_seek,
119 nfs_stat,

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

358 * Open a file.
359 * return zero or error number
360 */
361int
362nfs_open(upath, f)
363 const char *upath;
364 struct open_file *f;
365{
114struct fs_ops nfs_fsops = {
115 "nfs",
116 nfs_open,
117 nfs_close,
118 nfs_read,
119 nfs_write,
120 nfs_seek,
121 nfs_stat,

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

360 * Open a file.
361 * return zero or error number
362 */
363int
364nfs_open(upath, f)
365 const char *upath;
366 struct open_file *f;
367{
366 static struct nfs_iodesc nfs_root_node;
367 struct iodesc *desc;
368 struct nfs_iodesc *currfd;
369#ifndef NFS_NOSYMLINK
370 struct nfs_iodesc *newfd;
371 struct nfsv2_fattrs *fa;
372 register char *cp, *ncp;
373 register int c;
374 char namebuf[NFS_MAXPATHLEN + 1];

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

541{
542 register struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
543
544#ifdef NFS_DEBUG
545 if (debug)
546 printf("nfs_close: fp=0x%lx\n", (u_long)fp);
547#endif
548
368 struct iodesc *desc;
369 struct nfs_iodesc *currfd;
370#ifndef NFS_NOSYMLINK
371 struct nfs_iodesc *newfd;
372 struct nfsv2_fattrs *fa;
373 register char *cp, *ncp;
374 register int c;
375 char namebuf[NFS_MAXPATHLEN + 1];

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

542{
543 register struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
544
545#ifdef NFS_DEBUG
546 if (debug)
547 printf("nfs_close: fp=0x%lx\n", (u_long)fp);
548#endif
549
549 if (fp)
550 if (fp != &nfs_root_node && fp)
550 free(fp);
551 f->f_fsdata = (void *)0;
552
553 return (0);
554}
555
556/*
557 * read a portion of a file

--- 109 unchanged lines hidden ---
551 free(fp);
552 f->f_fsdata = (void *)0;
553
554 return (0);
555}
556
557/*
558 * read a portion of a file

--- 109 unchanged lines hidden ---