From owner-cvs-src@FreeBSD.ORG Tue Feb 17 08:35:17 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AEA016A4D1 for ; Tue, 17 Feb 2004 08:35:17 -0800 (PST) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id D367343D2D for ; Tue, 17 Feb 2004 08:35:16 -0800 (PST) (envelope-from nate@root.org) Received: (qmail 29703 invoked by uid 1000); 17 Feb 2004 16:35:17 -0000 Date: Tue, 17 Feb 2004 08:35:17 -0800 (PST) From: Nate Lawson To: Greg Lehey In-Reply-To: <20040217084308.152FE16A555@hub.freebsd.org> Message-ID: <20040217083328.G29569@root.org> References: <20040217084308.152FE16A555@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/mount Makefile mount.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2004 16:35:17 -0000 On Tue, 17 Feb 2004, Greg Lehey wrote: > FreeBSD src repository > > Modified files: > sbin/mount Makefile mount.c > Log: > Report the difference between ufs and ufs2. > > Submitted by: "Christian S.J. Peron" > > Revision Changes Path > 1.14 +2 -0 src/sbin/mount/Makefile > 1.64 +14 -3 src/sbin/mount/mount.c > > --- src/sbin/mount/mount.c:1.63 Mon Feb 2 20:03:19 2004 > +++ src/sbin/mount/mount.c Tue Feb 17 00:43:05 2004 > @@ -514,10 +519,16 @@ > int flags, i; > struct opt *o; > struct passwd *pw; > + struct uufsd disk; > > (void)printf("%s on %s (%s", sfp->f_mntfromname, sfp->f_mntonname, > sfp->f_fstypename); > > + if (strncmp(sfp->f_fstypename, "ufs", 3) == 0) { > + ufs_disk_fillout(&disk, sfp->f_mntonname); > + printf("%s", (disk.d_ufs == 2) ? "2" : ""); > + } > + A little less obfuscated would be: if (disk.d_ufs == 2) printf("2"); -Nate