Module Name: src
Committed By: uebayasi
Date: Thu Jan 28 07:24:56 UTC 2010
Modified Files:
src/sys/miscfs/genfs: genfs_io.c
Log Message:
genfs_putpages: Localize a few variables. No functional changes.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/miscfs/genfs/genfs_io.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.23 src/sys/miscfs/genfs/genfs_io.c:1.24
--- src/sys/miscfs/genfs/genfs_io.c:1.23 Wed Jan 27 15:53:06 2010
+++ src/sys/miscfs/genfs/genfs_io.c Thu Jan 28 07:24:55 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_io.c,v 1.23 2010/01/27 15:53:06 uebayasi Exp $ */
+/* $NetBSD: genfs_io.c,v 1.24 2010/01/28 07:24:55 uebayasi Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.23 2010/01/27 15:53:06 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.24 2010/01/28 07:24:55 uebayasi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,10 +105,10 @@
int a_flags;
} */ * const ap = v;
- off_t newsize, diskeof, memeof;
+ off_t diskeof, memeof;
off_t offset, origoffset, startoffset, endoffset;
daddr_t lbn, blkno;
- int i, error, npages, orignpages, npgs, run, ridx, pidx, pcount;
+ int i, error, npages, orignpages, npgs, run, ridx;
int fs_bshift, fs_bsize, dev_bshift;
const int flags = ap->a_flags;
size_t bytes, iobytes, tailstart, tailbytes, totalbytes, skipbytes;
@@ -146,6 +146,7 @@
orignpages = *ap->a_count;
GOP_SIZE(vp, origvsize, &diskeof, 0);
if (flags & PGO_PASTEOF) {
+ off_t newsize;
#if defined(DIAGNOSTIC)
off_t writeeof;
#endif /* defined(DIAGNOSTIC) */
@@ -452,6 +453,7 @@
for (offset = startoffset;
bytes > 0;
offset += iobytes, bytes -= iobytes) {
+ int pidx;
/*
* skip pages which don't need to be read.
@@ -501,6 +503,8 @@
iobytes = MIN((((off_t)lbn + 1 + run) << fs_bshift) - offset,
bytes);
if (offset + iobytes > round_page(offset)) {
+ int pcount;
+
pcount = 1;
while (pidx + pcount < npages &&
pgs[pidx + pcount]->flags & PG_FAKE) {