From owner-p4-projects Thu Jul 11 8: 0:19 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ABEB137B406; Thu, 11 Jul 2002 08:00:10 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52C6D37B401 for ; Thu, 11 Jul 2002 08:00:10 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45B4343E77 for ; Thu, 11 Jul 2002 08:00:08 -0700 (PDT) (envelope-from green@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6BF07JU034041 for ; Thu, 11 Jul 2002 08:00:07 -0700 (PDT) (envelope-from green@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6BF0720034038 for perforce@freebsd.org; Thu, 11 Jul 2002 08:00:07 -0700 (PDT) Date: Thu, 11 Jul 2002 08:00:07 -0700 (PDT) Message-Id: <200207111500.g6BF0720034038@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to green@freebsd.org using -f From: Brian Feldman Subject: PERFORCE change 14091 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14091 Change 14091 by green@green_laptop_2 on 2002/07/11 07:59:09 Display the mount point and inode for corrupted labels. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#163 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#163 (text+ko) ==== @@ -936,16 +936,23 @@ if (error == 0) error = mac_update_vnode_from_externalized(vp, &extmac); if (error) { + struct vattr va; + + printf("Corrupted label on %s", + vp->v_mount->mnt_stat.f_mntonname); + if (VOP_GETATTR(vp, &va, curthread->td_ucred, curthread) == 0) + printf(" inum %ld", va.va_fileid); if (mac_debug_label_fallback) { - printf("Corrupted label, falling back.\n"); + printf(", falling back.\n"); mac_update_vnode_from_mount(vp, vp->v_mount); + error = 0; } else { - printf("Corrupted label\n"); + printf(".\n"); error = EPERM; } } - return (0); + return (error); } /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message