Deleted Added
full compact
msdosfs_vnops.c (207662) msdosfs_vnops.c (207719)
1/* $FreeBSD: head/sys/fs/msdosfs/msdosfs_vnops.c 207662 2010-05-05 16:44:25Z trasz $ */
1/* $FreeBSD: head/sys/fs/msdosfs/msdosfs_vnops.c 207719 2010-05-06 18:43:19Z trasz $ */
2/* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */
3
4/*-
5 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
6 * Copyright (C) 1994, 1995, 1997 TooLs GmbH.
7 * All rights reserved.
8 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).
9 *

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

647 u_long osize;
648 int error = 0;
649 u_long count;
650 int seqcount;
651 daddr_t bn, lastcn;
652 struct buf *bp;
653 int ioflag = ap->a_ioflag;
654 struct uio *uio = ap->a_uio;
2/* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */
3
4/*-
5 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
6 * Copyright (C) 1994, 1995, 1997 TooLs GmbH.
7 * All rights reserved.
8 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).
9 *

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

647 u_long osize;
648 int error = 0;
649 u_long count;
650 int seqcount;
651 daddr_t bn, lastcn;
652 struct buf *bp;
653 int ioflag = ap->a_ioflag;
654 struct uio *uio = ap->a_uio;
655 struct thread *td = uio->uio_td;
656 struct vnode *vp = ap->a_vp;
657 struct vnode *thisvp;
658 struct denode *dep = VTODE(vp);
659 struct msdosfsmount *pmp = dep->de_pmp;
660 struct ucred *cred = ap->a_cred;
661
662#ifdef MSDOSFS_DEBUG
663 printf("msdosfs_write(vp %p, uio %p, ioflag %x, cred %p\n",

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

691 * uio->uio_offset >= 0 and uio->uio_resid >= 0.
692 */
693 if ((uoff_t)uio->uio_offset + uio->uio_resid > DOS_FILESIZE_MAX)
694 return (EFBIG);
695
696 /*
697 * If they've exceeded their filesize limit, tell them about it.
698 */
655 struct vnode *vp = ap->a_vp;
656 struct vnode *thisvp;
657 struct denode *dep = VTODE(vp);
658 struct msdosfsmount *pmp = dep->de_pmp;
659 struct ucred *cred = ap->a_cred;
660
661#ifdef MSDOSFS_DEBUG
662 printf("msdosfs_write(vp %p, uio %p, ioflag %x, cred %p\n",

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

690 * uio->uio_offset >= 0 and uio->uio_resid >= 0.
691 */
692 if ((uoff_t)uio->uio_offset + uio->uio_resid > DOS_FILESIZE_MAX)
693 return (EFBIG);
694
695 /*
696 * If they've exceeded their filesize limit, tell them about it.
697 */
699 if (vn_rlimit_fsize(vp, uio, td))
698 if (vn_rlimit_fsize(vp, uio, uio->uio_td))
700 return (EFBIG);
701
702 /*
703 * If the offset we are starting the write at is beyond the end of
704 * the file, then they've done a seek. Unix filesystems allow
705 * files with holes in them, DOS doesn't so we must fill the hole
706 * with zeroed blocks.
707 */

--- 1275 unchanged lines hidden ---
699 return (EFBIG);
700
701 /*
702 * If the offset we are starting the write at is beyond the end of
703 * the file, then they've done a seek. Unix filesystems allow
704 * files with holes in them, DOS doesn't so we must fill the hole
705 * with zeroed blocks.
706 */

--- 1275 unchanged lines hidden ---