Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev whitespace police
details: https://anonhg.NetBSD.org/src/rev/f6bf297a65bd
branches: trunk
changeset: 338457:f6bf297a65bd
user: prlw1 <prlw1%NetBSD.org@localhost>
date: Mon May 25 20:57:18 2015 +0000
description:
whitespace police
diffstat:
sys/dev/vnd.c | 42 +++++++++++++++++++++---------------------
sys/dev/vndvar.h | 4 ++--
2 files changed, 23 insertions(+), 23 deletions(-)
diffs (184 lines):
diff -r 4bab40fea15d -r f6bf297a65bd sys/dev/vnd.c
--- a/sys/dev/vnd.c Mon May 25 18:41:08 2015 +0000
+++ b/sys/dev/vnd.c Mon May 25 20:57:18 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.243 2015/04/26 15:15:20 mlelstv Exp $ */
+/* $NetBSD: vnd.c,v 1.244 2015/05/25 20:57:18 prlw1 Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.243 2015/04/26 15:15:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.244 2015/05/25 20:57:18 prlw1 Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -658,7 +658,7 @@
/* handle a compressed read */
if ((obp->b_flags & B_READ) != 0 && (vnd->sc_flags & VNF_COMP)) {
off_t bn;
-
+
/* Convert to a byte offset within the file. */
bn = obp->b_rawblkno *
vnd->sc_dkdev.dk_label->d_secsize;
@@ -667,7 +667,7 @@
goto done;
}
#endif /* VND_COMPRESSION */
-
+
/*
* Allocate a header for this transfer and link it to the
* buffer
@@ -896,7 +896,7 @@
* fsync won't wait for this write which
* has no chance to complete before all nested bufs
* have been queued. But it has to be done
- * before the last VOP_STRATEGY()
+ * before the last VOP_STRATEGY()
* or the call to nestiobuf_done().
*/
w_vp = bp->b_vp;
@@ -905,9 +905,9 @@
mutex_exit(w_vp->v_interlock);
}
KASSERT(skipped != 0 || nbp != NULL);
- if (skipped)
+ if (skipped)
nestiobuf_done(bp, skipped, error);
- else
+ else
VOP_STRATEGY(vp, nbp);
}
@@ -1181,11 +1181,11 @@
int i;
u_int32_t comp_size;
u_int32_t comp_maxsize;
-
+
/* allocate space for compresed file header */
ch = malloc(sizeof(struct vnd_comp_header),
M_TEMP, M_WAITOK);
-
+
/* read compressed file header */
error = vn_rdwr(UIO_READ, nd.ni_vp, (void *)ch,
sizeof(struct vnd_comp_header), 0, UIO_SYSSPACE,
@@ -1195,7 +1195,7 @@
VOP_UNLOCK(nd.ni_vp);
goto close_and_exit;
}
-
+
/* save some header info */
vnd->sc_comp_blksz = ntohl(ch->block_size);
/* note last offset is the file byte size */
@@ -1214,17 +1214,17 @@
error = EINVAL;
goto close_and_exit;
}
-
+
/* set decompressed file size */
vattr.va_size =
((u_quad_t)vnd->sc_comp_numoffs - 1) *
(u_quad_t)vnd->sc_comp_blksz;
-
+
/* allocate space for all the compressed offsets */
vnd->sc_comp_offsets =
malloc(sizeof(u_int64_t) * vnd->sc_comp_numoffs,
M_DEVBUF, M_WAITOK);
-
+
/* read in the offsets */
error = vn_rdwr(UIO_READ, nd.ni_vp,
(void *)vnd->sc_comp_offsets,
@@ -1250,16 +1250,16 @@
}
vnd->sc_comp_offsets[vnd->sc_comp_numoffs - 1] =
be64toh(vnd->sc_comp_offsets[vnd->sc_comp_numoffs - 1]);
-
+
/* create compressed data buffer */
vnd->sc_comp_buff = malloc(comp_maxsize,
M_DEVBUF, M_WAITOK);
-
+
/* create decompressed buffer */
vnd->sc_comp_decombuf = malloc(vnd->sc_comp_blksz,
M_DEVBUF, M_WAITOK);
vnd->sc_comp_buffblk = -1;
-
+
/* Initialize decompress stream */
memset(&vnd->sc_comp_stream, 0, sizeof(z_stream));
vnd->sc_comp_stream.zalloc = vnd_alloc;
@@ -1273,7 +1273,7 @@
error = EINVAL;
goto close_and_exit;
}
-
+
vnd->sc_flags |= VNF_COMP | VNF_READONLY;
#else /* !VND_COMPRESSION */
VOP_UNLOCK(nd.ni_vp);
@@ -1281,7 +1281,7 @@
goto close_and_exit;
#endif /* VND_COMPRESSION */
}
-
+
VOP_UNLOCK(nd.ni_vp);
vnd->sc_vp = nd.ni_vp;
vnd->sc_size = btodb(vattr.va_size); /* note truncation */
@@ -2041,7 +2041,7 @@
vnd_modcmd(modcmd_t cmd, void *arg)
{
int bmajor = -1, cmajor = -1, error = 0;
-
+
switch (cmd) {
case MODULE_CMD_INIT:
error = config_cfdriver_attach(&vnd_cd);
@@ -2055,7 +2055,7 @@
vnd_cd.cd_name);
break;
}
-
+
error = devsw_attach("vnd", &vnd_bdevsw, &bmajor,
&vnd_cdevsw, &cmajor);
if (error) {
@@ -2063,7 +2063,7 @@
config_cfdriver_detach(&vnd_cd);
break;
}
-
+
break;
case MODULE_CMD_FINI:
diff -r 4bab40fea15d -r f6bf297a65bd sys/dev/vndvar.h
--- a/sys/dev/vndvar.h Mon May 25 18:41:08 2015 +0000
+++ b/sys/dev/vndvar.h Mon May 25 20:57:18 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vndvar.h,v 1.33 2013/06/03 16:42:32 christos Exp $ */
+/* $NetBSD: vndvar.h,v 1.34 2015/05/25 20:57:18 prlw1 Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
* A vnode disk's state information.
*/
struct vnd_softc {
- device_t sc_dev;
+ device_t sc_dev;
int sc_flags; /* flags */
uint64_t sc_size; /* size of vnd */
struct vnode *sc_vp; /* vnode */
Home |
Main Index |
Thread Index |
Old Index