cvs commit: src/sbin/mount Makefile mount.c

Nate Lawson nate at root.org
Tue Feb 17 08:35:17 PST 2004


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" <maneo at bsdpro.com>
>
>   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


More information about the cvs-src mailing list