Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs Make the userland signature and uses of brea...
details: https://anonhg.NetBSD.org/src/rev/f92afee8eb78
branches: trunk
changeset: 336979:f92afee8eb78
user: agc <agc%NetBSD.org@localhost>
date: Sun Mar 29 05:52:59 2015 +0000
description:
Make the userland signature and uses of bread() match the kernel ones,
after the removal of the cred argument.
diffstat:
usr.sbin/makefs/ffs/buf.c | 8 ++++----
usr.sbin/makefs/ffs/buf.h | 5 ++---
usr.sbin/makefs/ffs/ffs_alloc.c | 8 ++++----
usr.sbin/makefs/ffs/ffs_balloc.c | 21 ++++++++++-----------
usr.sbin/makefs/msdos/msdosfs_denode.c | 6 +++---
usr.sbin/makefs/msdos/msdosfs_vfsops.c | 6 +++---
usr.sbin/makefs/msdos/msdosfs_vnops.c | 8 ++++----
7 files changed, 30 insertions(+), 32 deletions(-)
diffs (268 lines):
diff -r 8c2f0ddf7d43 -r f92afee8eb78 usr.sbin/makefs/ffs/buf.c
--- a/usr.sbin/makefs/ffs/buf.c Sun Mar 29 00:42:51 2015 +0000
+++ b/usr.sbin/makefs/ffs/buf.c Sun Mar 29 05:52:59 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.c,v 1.21 2013/02/03 03:21:21 christos Exp $ */
+/* $NetBSD: buf.c,v 1.22 2015/03/29 05:52:59 agc Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: buf.c,v 1.21 2013/02/03 03:21:21 christos Exp $");
+__RCSID("$NetBSD: buf.c,v 1.22 2015/03/29 05:52:59 agc Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -60,8 +60,8 @@
TAILQ_HEAD(buftailhead,buf) buftail;
int
-bread(struct vnode *vp, daddr_t blkno, int size, struct kauth_cred *u1 __unused,
- int u2 __unused, struct buf **bpp)
+bread(struct vnode *vp, daddr_t blkno, int size, int u2 __unused,
+ struct buf **bpp)
{
off_t offset;
ssize_t rv;
diff -r 8c2f0ddf7d43 -r f92afee8eb78 usr.sbin/makefs/ffs/buf.h
--- a/usr.sbin/makefs/ffs/buf.h Sun Mar 29 00:42:51 2015 +0000
+++ b/usr.sbin/makefs/ffs/buf.h Sun Mar 29 05:52:59 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.9 2013/01/30 19:19:19 christos Exp $ */
+/* $NetBSD: buf.h,v 1.10 2015/03/29 05:52:59 agc Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -75,8 +75,7 @@
struct kauth_cred;
void bcleanup(void);
-int bread(struct vnode *, daddr_t, int, struct kauth_cred *,
- int, struct buf **);
+int bread(struct vnode *, daddr_t, int, int, struct buf **);
void brelse(struct buf *, int);
int bwrite(struct buf *);
struct buf * getblk(struct vnode *, daddr_t, int, int, int);
diff -r 8c2f0ddf7d43 -r f92afee8eb78 usr.sbin/makefs/ffs/ffs_alloc.c
--- a/usr.sbin/makefs/ffs/ffs_alloc.c Sun Mar 29 00:42:51 2015 +0000
+++ b/usr.sbin/makefs/ffs/ffs_alloc.c Sun Mar 29 05:52:59 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_alloc.c,v 1.27 2013/06/23 22:03:34 dholland Exp $ */
+/* $NetBSD: ffs_alloc.c,v 1.28 2015/03/29 05:52:59 agc Exp $ */
/* From: NetBSD: ffs_alloc.c,v 1.50 2001/09/06 02:16:01 lukem Exp */
/*
@@ -47,7 +47,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs_alloc.c,v 1.27 2013/06/23 22:03:34 dholland Exp $");
+__RCSID("$NetBSD: ffs_alloc.c,v 1.28 2015/03/29 05:52:59 agc Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -308,7 +308,7 @@
if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize)
return (0);
error = bread(ip->i_devvp, FFS_FSBTODB(fs, cgtod(fs, cg)),
- (int)fs->fs_cgsize, NULL, 0, &bp);
+ (int)fs->fs_cgsize, 0, &bp);
if (error) {
return (0);
}
@@ -451,7 +451,7 @@
return;
}
error = bread(ip->i_devvp, FFS_FSBTODB(fs, cgtod(fs, cg)),
- (int)fs->fs_cgsize, NULL, 0, &bp);
+ (int)fs->fs_cgsize, 0, &bp);
if (error) {
brelse(bp, 0);
return;
diff -r 8c2f0ddf7d43 -r f92afee8eb78 usr.sbin/makefs/ffs/ffs_balloc.c
--- a/usr.sbin/makefs/ffs/ffs_balloc.c Sun Mar 29 00:42:51 2015 +0000
+++ b/usr.sbin/makefs/ffs/ffs_balloc.c Sun Mar 29 05:52:59 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_balloc.c,v 1.20 2013/06/23 07:28:37 dholland Exp $ */
+/* $NetBSD: ffs_balloc.c,v 1.21 2015/03/29 05:52:59 agc Exp $ */
/* From NetBSD: ffs_balloc.c,v 1.25 2001/08/08 08:36:36 lukem Exp */
/*
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs_balloc.c,v 1.20 2013/06/23 07:28:37 dholland Exp $");
+__RCSID("$NetBSD: ffs_balloc.c,v 1.21 2015/03/29 05:52:59 agc Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -139,7 +139,7 @@
if (bpp != NULL) {
error = bread(ip->i_devvp, lbn, fs->fs_bsize,
- NULL, 0, bpp);
+ 0, bpp);
if (error) {
brelse(*bpp, 0);
return (error);
@@ -165,7 +165,7 @@
if (bpp != NULL) {
error = bread(ip->i_devvp, lbn, osize,
- NULL, 0, bpp);
+ 0, bpp);
if (error) {
brelse(*bpp, 0);
return (error);
@@ -251,7 +251,7 @@
for (i = 1;;) {
error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize,
- NULL, 0, &bp);
+ 0, &bp);
if (error) {
brelse(bp, 0);
return error;
@@ -321,8 +321,7 @@
}
brelse(bp, 0);
if (bpp != NULL) {
- error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, 0,
- &nbp);
+ error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, 0, &nbp);
if (error) {
brelse(nbp, 0);
return error;
@@ -390,7 +389,7 @@
if (bpp != NULL) {
error = bread(ip->i_devvp, lbn, fs->fs_bsize,
- NULL, 0, bpp);
+ 0, bpp);
if (error) {
brelse(*bpp, 0);
return (error);
@@ -416,7 +415,7 @@
if (bpp != NULL) {
error = bread(ip->i_devvp, lbn, osize,
- NULL, 0, bpp);
+ 0, bpp);
if (error) {
brelse(*bpp, 0);
return (error);
@@ -502,7 +501,7 @@
for (i = 1;;) {
error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize,
- NULL, 0, &bp);
+ 0, &bp);
if (error) {
brelse(bp, 0);
return error;
@@ -572,7 +571,7 @@
}
brelse(bp, 0);
if (bpp != NULL) {
- error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, 0,
+ error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, 0,
&nbp);
if (error) {
brelse(nbp, 0);
diff -r 8c2f0ddf7d43 -r f92afee8eb78 usr.sbin/makefs/msdos/msdosfs_denode.c
--- a/usr.sbin/makefs/msdos/msdosfs_denode.c Sun Mar 29 00:42:51 2015 +0000
+++ b/usr.sbin/makefs/msdos/msdosfs_denode.c Sun Mar 29 05:52:59 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_denode.c,v 1.6 2013/10/19 17:16:37 christos Exp $ */
+/* $NetBSD: msdosfs_denode.c,v 1.7 2015/03/29 05:52:59 agc Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -52,7 +52,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.6 2013/10/19 17:16:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.7 2015/03/29 05:52:59 agc Exp $");
#include <sys/param.h>
@@ -259,7 +259,7 @@
if (isadir) {
bn = cntobn(pmp, eofentry);
error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn),
- pmp->pm_bpcluster, NOCRED, B_MODIFY, &bp);
+ pmp->pm_bpcluster, B_MODIFY, &bp);
if (error) {
#ifdef MSDOSFS_DEBUG
printf("detrunc(): bread fails %d\n", error);
diff -r 8c2f0ddf7d43 -r f92afee8eb78 usr.sbin/makefs/msdos/msdosfs_vfsops.c
--- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c Sun Mar 29 00:42:51 2015 +0000
+++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c Sun Mar 29 05:52:59 2015 +0000
@@ -50,7 +50,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.8 2014/07/09 06:04:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.9 2015/03/29 05:52:59 agc Exp $");
#include <sys/param.h>
@@ -96,7 +96,7 @@
unsigned secsize = 512;
DPRINTF(("%s(bread 0)\n", __func__));
- if ((error = bread(devvp, 0, secsize, NULL, 0, &bp)) != 0)
+ if ((error = bread(devvp, 0, secsize, 0, &bp)) != 0)
goto error_exit;
bsp = (union bootsector *)bp->b_data;
@@ -336,7 +336,7 @@
DPRINTF(("%s(bread %lu)\n", __func__,
(unsigned long)de_bn2kb(pmp, pmp->pm_fsinfo)));
if ((error = bread(devvp, de_bn2kb(pmp, pmp->pm_fsinfo),
- pmp->pm_BytesPerSec, NULL, 0, &bp)) != 0)
+ pmp->pm_BytesPerSec, 0, &bp)) != 0)
goto error_exit;
fp = (struct fsinfo *)bp->b_data;
if (!memcmp(fp->fsisig1, "RRaA", 4)
diff -r 8c2f0ddf7d43 -r f92afee8eb78 usr.sbin/makefs/msdos/msdosfs_vnops.c
--- a/usr.sbin/makefs/msdos/msdosfs_vnops.c Sun Mar 29 00:42:51 2015 +0000
+++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c Sun Mar 29 05:52:59 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.15 2013/10/19 17:16:37 christos Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.16 2015/03/29 05:52:59 agc Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -51,7 +51,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.15 2013/10/19 17:16:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.16 2015/03/29 05:52:59 agc Exp $");
#include <sys/param.h>
#include <sys/mman.h>
@@ -192,7 +192,7 @@
break;
return (error);
}
- error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn), blsize, NOCRED,
+ error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn), blsize,
0, &bp);
if (error) {
return (error);
@@ -483,7 +483,7 @@
cn, (unsigned long long)bn,
(unsigned long long)de_bn2kb(pmp, bn), blsize));
if ((error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn), blsize,
- NULL, 0, &bp)) != 0) {
+ 0, &bp)) != 0) {
DPRINTF(("bread %d\n", error));
goto out;
}
Home |
Main Index |
Thread Index |
Old Index