Fri Nov 28 10:57:03 2008 UTC ()
Tyop: v -> vp.  Spotted by Tom's ARM builds.


(pooka)
diff -r1.54 -r1.55 src/sys/fs/msdosfs/msdosfs_vnops.c

cvs diff -r1.54 -r1.55 src/sys/fs/msdosfs/msdosfs_vnops.c (expand / switch to unified diff)

--- src/sys/fs/msdosfs/msdosfs_vnops.c 2008/11/26 20:17:33 1.54
+++ src/sys/fs/msdosfs/msdosfs_vnops.c 2008/11/28 10:57:03 1.55
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: msdosfs_vnops.c,v 1.54 2008/11/26 20:17:33 pooka Exp $ */ 1/* $NetBSD: msdosfs_vnops.c,v 1.55 2008/11/28 10:57:03 pooka Exp $ */
2 2
3/*- 3/*-
4 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. 4 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
5 * Copyright (C) 1994, 1995, 1997 TooLs GmbH. 5 * Copyright (C) 1994, 1995, 1997 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below). 7 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -38,27 +38,27 @@ @@ -38,27 +38,27 @@
38 * it, and don't remove this notice. 38 * it, and don't remove this notice.
39 * 39 *
40 * This software is provided "as is". 40 * This software is provided "as is".
41 * 41 *
42 * The author supplies this software to be publicly redistributed on the 42 * The author supplies this software to be publicly redistributed on the
43 * understanding that the author is not responsible for the correct 43 * understanding that the author is not responsible for the correct
44 * functioning of this software in any circumstances and is not liable for 44 * functioning of this software in any circumstances and is not liable for
45 * any damages caused by this software. 45 * any damages caused by this software.
46 * 46 *
47 * October 1992 47 * October 1992
48 */ 48 */
49 49
50#include <sys/cdefs.h> 50#include <sys/cdefs.h>
51__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.54 2008/11/26 20:17:33 pooka Exp $"); 51__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.55 2008/11/28 10:57:03 pooka Exp $");
52 52
53#include <sys/param.h> 53#include <sys/param.h>
54#include <sys/systm.h> 54#include <sys/systm.h>
55#include <sys/namei.h> 55#include <sys/namei.h>
56#include <sys/resourcevar.h> /* defines plimit structure in proc struct */ 56#include <sys/resourcevar.h> /* defines plimit structure in proc struct */
57#include <sys/kernel.h> 57#include <sys/kernel.h>
58#include <sys/file.h> /* define FWRITE ... */ 58#include <sys/file.h> /* define FWRITE ... */
59#include <sys/stat.h> 59#include <sys/stat.h>
60#include <sys/buf.h> 60#include <sys/buf.h>
61#include <sys/proc.h> 61#include <sys/proc.h>
62#include <sys/mount.h> 62#include <sys/mount.h>
63#include <sys/vnode.h> 63#include <sys/vnode.h>
64#include <sys/signalvar.h> 64#include <sys/signalvar.h>
@@ -477,27 +477,27 @@ msdosfs_read(v) @@ -477,27 +477,27 @@ msdosfs_read(v)
477 if (uio->uio_offset >= dep->de_FileSize) 477 if (uio->uio_offset >= dep->de_FileSize)
478 return (0); 478 return (0);
479 479
480 if (vp->v_type == VREG) { 480 if (vp->v_type == VREG) {
481 const int advice = IO_ADV_DECODE(ap->a_ioflag); 481 const int advice = IO_ADV_DECODE(ap->a_ioflag);
482 482
483 while (uio->uio_resid > 0) { 483 while (uio->uio_resid > 0) {
484 bytelen = MIN(dep->de_FileSize - uio->uio_offset, 484 bytelen = MIN(dep->de_FileSize - uio->uio_offset,
485 uio->uio_resid); 485 uio->uio_resid);
486 486
487 if (bytelen == 0) 487 if (bytelen == 0)
488 break; 488 break;
489 error = ubc_uiomove(&vp->v_uobj, uio, bytelen, advice, 489 error = ubc_uiomove(&vp->v_uobj, uio, bytelen, advice,
490 UBC_READ | UBC_PARTIALOK | UBC_UNMAP_FLAG(v)); 490 UBC_READ | UBC_PARTIALOK | UBC_UNMAP_FLAG(vp));
491 if (error) 491 if (error)
492 break; 492 break;
493 } 493 }
494 dep->de_flag |= DE_ACCESS; 494 dep->de_flag |= DE_ACCESS;
495 goto out; 495 goto out;
496 } 496 }
497 497
498 /* this loop is only for directories now */ 498 /* this loop is only for directories now */
499 do { 499 do {
500 lbn = de_cluster(pmp, uio->uio_offset); 500 lbn = de_cluster(pmp, uio->uio_offset);
501 on = uio->uio_offset & pmp->pm_crbomask; 501 on = uio->uio_offset & pmp->pm_crbomask;
502 n = MIN(pmp->pm_bpcluster - on, uio->uio_resid); 502 n = MIN(pmp->pm_bpcluster - on, uio->uio_resid);
503 if (uio->uio_offset >= dep->de_FileSize) 503 if (uio->uio_offset >= dep->de_FileSize)