diff options
author | julian <julian@FreeBSD.org> | 1999-09-03 09:14:36 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-09-03 09:14:36 +0000 |
commit | f56c58792745f748b24761ec0f23c864cd0c9583 (patch) | |
tree | 4d26d1d483e6c0b54e5c52b938d4197c9eb2c338 | |
parent | a5d766bc99873104e223b81fcc566bea7715e8d0 (diff) | |
download | FreeBSD-src-f56c58792745f748b24761ec0f23c864cd0c9583.zip FreeBSD-src-f56c58792745f748b24761ec0f23c864cd0c9583.tar.gz |
Print out the device name when there is an uninitialised IO size or IO error
in spec_getpages().
Submitted by: phk suggested the idea.
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 5 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 44c23ba..9d85bfe 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -227,6 +227,7 @@ spec_open(ap) error = (*dsw->d_open)(dev, ap->a_mode, S_IFBLK, p); break; default: + error = 0; break; } @@ -903,8 +904,8 @@ spec_getpages(ap) m = ap->a_m[ap->a_reqpage]; #ifndef MAX_PERF printf( - "spec_getpages: I/O read failure: (error code=%d) bp %p vp %p\n", - error, bp, bp->b_vp); + "spec_getpages:(%s) I/O read failure: (error=%d) bp %p vp %p\n", + devtoname(bp->b_dev), error, bp, bp->b_vp); printf( " size: %d, resid: %ld, a_count: %d, valid: 0x%x\n", size, bp->b_resid, ap->a_count, m->valid); diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 44c23ba..9d85bfe 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -227,6 +227,7 @@ spec_open(ap) error = (*dsw->d_open)(dev, ap->a_mode, S_IFBLK, p); break; default: + error = 0; break; } @@ -903,8 +904,8 @@ spec_getpages(ap) m = ap->a_m[ap->a_reqpage]; #ifndef MAX_PERF printf( - "spec_getpages: I/O read failure: (error code=%d) bp %p vp %p\n", - error, bp, bp->b_vp); + "spec_getpages:(%s) I/O read failure: (error=%d) bp %p vp %p\n", + devtoname(bp->b_dev), error, bp, bp->b_vp); printf( " size: %d, resid: %ld, a_count: %d, valid: 0x%x\n", size, bp->b_resid, ap->a_count, m->valid); |