summaryrefslogtreecommitdiff
path: root/sys/lib/libsa
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2004-06-22 23:17:11 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2004-06-22 23:17:11 +0000
commit48ca01f12bfdbf2e44ed4968a358f55f61983b2d (patch)
tree5c6b479a1bc5e2a28c5d02465b962105350ac3bc /sys/lib/libsa
parenta5792356458a7ed9bb6a7d4aa578b74e9d704e84 (diff)
Change of variable name from read to nread, to reduce difference
from NetBSD version. ok weingart@
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r--sys/lib/libsa/cd9660.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sys/lib/libsa/cd9660.c b/sys/lib/libsa/cd9660.c
index 39751e4e2b2..52f403154a6 100644
--- a/sys/lib/libsa/cd9660.c
+++ b/sys/lib/libsa/cd9660.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660.c,v 1.10 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: cd9660.c,v 1.11 2004/06/22 23:17:10 tom Exp $ */
/* $NetBSD: cd9660.c,v 1.1 1996/09/30 16:01:19 ws Exp $ */
/*
@@ -133,7 +133,7 @@ cd9660_open(char *path, struct open_file *f)
struct file *fp = 0;
void *buf;
struct iso_primary_descriptor *vd;
- size_t buf_size, read, psize, dsize;
+ size_t buf_size, nread, psize, dsize;
daddr_t bno;
int parent, ent;
struct ptable_ent *pp;
@@ -147,10 +147,10 @@ cd9660_open(char *path, struct open_file *f)
for (bno = 16;; bno++) {
twiddle();
rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno),
- ISO_DEFAULT_BLOCK_SIZE, buf, &read);
+ ISO_DEFAULT_BLOCK_SIZE, buf, &nread);
if (rc)
goto out;
- if (read != ISO_DEFAULT_BLOCK_SIZE) {
+ if (nread != ISO_DEFAULT_BLOCK_SIZE) {
rc = EIO;
goto out;
}
@@ -176,10 +176,10 @@ cd9660_open(char *path, struct open_file *f)
twiddle();
rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno),
- buf_size, buf, &read);
+ buf_size, buf, &nread);
if (rc)
goto out;
- if (read != buf_size) {
+ if (nread != buf_size) {
rc = EIO;
goto out;
}
@@ -227,10 +227,10 @@ cd9660_open(char *path, struct open_file *f)
rc = f->f_dev->dv_strategy(f->f_devdata, F_READ,
cdb2devb(bno),
ISO_DEFAULT_BLOCK_SIZE,
- buf, &read);
+ buf, &nread);
if (rc)
goto out;
- if (read != ISO_DEFAULT_BLOCK_SIZE) {
+ if (nread != ISO_DEFAULT_BLOCK_SIZE) {
rc = EIO;
goto out;
}
@@ -296,7 +296,7 @@ cd9660_read(struct open_file *f, void *start, size_t size, size_t *resid)
daddr_t bno;
char buf[ISO_DEFAULT_BLOCK_SIZE];
char *dp;
- size_t read, off;
+ size_t nread, off;
while (size) {
if (fp->off < 0 || fp->off >= fp->size)
@@ -309,20 +309,20 @@ cd9660_read(struct open_file *f, void *start, size_t size, size_t *resid)
dp = start;
twiddle();
rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno),
- ISO_DEFAULT_BLOCK_SIZE, dp, &read);
+ ISO_DEFAULT_BLOCK_SIZE, dp, &nread);
if (rc)
return rc;
- if (read != ISO_DEFAULT_BLOCK_SIZE)
+ if (nread != ISO_DEFAULT_BLOCK_SIZE)
return EIO;
if (dp == buf) {
off = fp->off & (ISO_DEFAULT_BLOCK_SIZE - 1);
- if (read > off + size)
- read = off + size;
- read -= off;
- bcopy(buf + off, start, read);
- start += read;
- fp->off += read;
- size -= read;
+ if (nread > off + size)
+ nread = off + size;
+ nread -= off;
+ bcopy(buf + off, start, nread);
+ start += nread;
+ fp->off += nread;
+ size -= nread;
} else {
start += ISO_DEFAULT_BLOCK_SIZE;
fp->off += ISO_DEFAULT_BLOCK_SIZE;