Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs Restore apple ufs error handling.
details: https://anonhg.NetBSD.org/src/rev/253771aec010
branches: trunk
changeset: 805035:253771aec010
user: christos <christos%NetBSD.org@localhost>
date: Sun Dec 14 01:13:57 2014 +0000
description:
Restore apple ufs error handling.
diffstat:
sys/ufs/ffs/ffs_vfsops.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diffs (50 lines):
diff -r 6ed050b8256c -r 253771aec010 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Sun Dec 14 00:36:07 2014 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Sun Dec 14 01:13:57 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.303 2014/12/14 00:36:07 christos Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.304 2014/12/14 01:13:57 christos Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.303 2014/12/14 00:36:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.304 2014/12/14 01:13:57 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -773,10 +773,11 @@
* EINVAL is most probably a blocksize or alignment problem,
* it is unlikely that this is an Apple UFS filesystem then.
*/
- error = bread(devvp, (daddr_t)(APPLEUFS_LABEL_OFFSET / DEV_BSIZE),
- APPLEUFS_LABEL_SIZE, cred, 0, &bp);
+ error = bread(devvp,
+ (daddr_t)(APPLEUFS_LABEL_OFFSET / DEV_BSIZE),
+ APPLEUFS_LABEL_SIZE, cred, 0, &bp);
if (error && error != EINVAL) {
- return (error);
+ return error;
}
if (error == 0) {
error = ffs_appleufs_validate(fs->fs_fsmnt,
@@ -1153,15 +1154,10 @@
}
error = ffs_appleufs_validate(fs->fs_fsmnt,
(struct appleufslabel *)bp->b_data, NULL);
- (struct appleufslabel *)bp->b_data, NULL);
+ if (error == 0)
ump->um_flags |= UFS_ISAPPLEUFS;
brelse(bp, 0);
bp = NULL;
- if (error) {
- DPRINTF(("%s: ffs_appleufs_validate %d\n", __func__,
- error));
- goto out;
- }
}
#else
if (ump->um_flags & UFS_ISAPPLEUFS) {
Home |
Main Index |
Thread Index |
Old Index