Deleted Added
full compact
ext2_vfsops.c (72200) ext2_vfsops.c (73286)
1/*
2 * modified for EXT2FS support in Lites 1.1
3 *
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
6 */
7/*
8 * Copyright (c) 1989, 1991, 1993, 1994

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

32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
1/*
2 * modified for EXT2FS support in Lites 1.1
3 *
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
6 */
7/*
8 * Copyright (c) 1989, 1991, 1993, 1994

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

32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
40 * $FreeBSD: head/sys/gnu/fs/ext2fs/ext2_vfsops.c 72200 2001-02-09 06:11:45Z bmilekic $
40 * $FreeBSD: head/sys/gnu/fs/ext2fs/ext2_vfsops.c 73286 2001-03-01 21:00:17Z adrian $
41 */
42
43#include "opt_quota.h"
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/namei.h>
48#include <sys/proc.h>

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

187 struct vnode *devvp;
188 struct ufs_args args;
189 struct ufsmount *ump = 0;
190 register struct ext2_sb_info *fs;
191 size_t size;
192 int error, flags;
193 mode_t accessmode;
194
41 */
42
43#include "opt_quota.h"
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/namei.h>
48#include <sys/proc.h>

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

187 struct vnode *devvp;
188 struct ufs_args args;
189 struct ufsmount *ump = 0;
190 register struct ext2_sb_info *fs;
191 size_t size;
192 int error, flags;
193 mode_t accessmode;
194
195 if ((error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args))) != 0)
195 /* Double-check the length of path.. */
196 if (strlen(path) >= MAXMNTLEN - 1)
197 return (ENAMETOOLONG);
198 error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args));
199 if (error != 0)
196 return (error);
197 /*
198 * If updating, check whether changing from read-only to
199 * read/write; if there is no device name, that's all we do.
200 */
201 if (mp->mnt_flag & MNT_UPDATE) {
202 ump = VFSTOUFS(mp);
203 fs = ump->um_e2fs;

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

303 vrele(devvp);
304 }
305 if (error) {
306 vrele(devvp);
307 return (error);
308 }
309 ump = VFSTOUFS(mp);
310 fs = ump->um_e2fs;
200 return (error);
201 /*
202 * If updating, check whether changing from read-only to
203 * read/write; if there is no device name, that's all we do.
204 */
205 if (mp->mnt_flag & MNT_UPDATE) {
206 ump = VFSTOUFS(mp);
207 fs = ump->um_e2fs;

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

307 vrele(devvp);
308 }
309 if (error) {
310 vrele(devvp);
311 return (error);
312 }
313 ump = VFSTOUFS(mp);
314 fs = ump->um_e2fs;
311 (void) copyinstr(path, fs->fs_fsmnt, sizeof(fs->fs_fsmnt) - 1, &size);
312 bzero(fs->fs_fsmnt + size, sizeof(fs->fs_fsmnt) - size);
313 bcopy((caddr_t)fs->fs_fsmnt, (caddr_t)mp->mnt_stat.f_mntonname,
314 MNAMELEN);
315 /*
316 * Note that this strncpy() is ok because of a check at the start
317 * of ext2_mount().
318 */
319 strncpy(fs->fs_fsmnt, path, MAXMNTLEN);
320 fs->fs_fsmnt[MAXMNTLEN - 1] = '\0';
315 (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
316 &size);
317 bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
318 (void)ext2_statfs(mp, &mp->mnt_stat, p);
319 return (0);
320}
321
322/*

--- 881 unchanged lines hidden ---
321 (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
322 &size);
323 bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
324 (void)ext2_statfs(mp, &mp->mnt_stat, p);
325 return (0);
326}
327
328/*

--- 881 unchanged lines hidden ---