cvs commit: src/sbin/mdconfig mdconfig.8 mdconfig.c

Nate Lawson nate at root.org
Tue Feb 27 19:10:17 UTC 2007


Nick Hibma wrote:
> n_hibma     2007-02-27 09:04:56 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:        (Branch: RELENG_6)
>     sbin/mdconfig        mdconfig.8 mdconfig.c 
>   Log:
>   MFC
>           rev. 1.34-1.36 mdconfig.8
>           rev. 1.52-1.54 mdconfig.c
>   
>   Make attach the default for -f and assume '-a' and '-t malloc' flags for '-s
>   <size>' (malloc ramdisk) if not specified.
>   

Except it's actually a swap disk, not malloc disk.  The code is correct,
not the commit message.

> @@ -177,6 +181,17 @@
>  			mdio.md_sectorsize = strtoul(optarg, &p, 0);
>  			break;
>  		case 's':
> +			if (cmdline == 0) {
> +				/* Imply ``-a'' */
> +				action = ATTACH;
> +				cmdline = 1;
> +			}
> +			if (cmdline == 1) {
> +				/* Imply ``-t swap'' */
> +				mdio.md_type = MD_SWAP;
> +				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
> +				cmdline = 2;
> +			}
>  			if (cmdline != 2)
>  				usage();
>  			mdio.md_mediasize = (off_t)strtoumax(optarg, &p, 0);


-- 
Nate


More information about the cvs-src mailing list