Author: avg
Date: Fri Jun  5 15:14:54 2015
New Revision: 284023
URL: https://svnweb.freebsd.org/changeset/base/284023

Log:
  bhyve/vmrun.sh: support passing disk options same as for bhyve(8)
  
  Differential Revision:        https://reviews.freebsd.org/D2723
  Reviewed by:  neel
  MFC after:    8 days

Modified:
  head/share/examples/bhyve/vmrun.sh

Modified: head/share/examples/bhyve/vmrun.sh
==============================================================================
--- head/share/examples/bhyve/vmrun.sh  Fri Jun  5 11:37:54 2015        
(r284022)
+++ head/share/examples/bhyve/vmrun.sh  Fri Jun  5 15:14:54 2015        
(r284023)
@@ -104,7 +104,10 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c 
                console=${OPTARG}
                ;;
        d)
-               eval "disk_dev${disk_total}=\"${OPTARG}\""
+               disk_dev=${OPTARG%%,*}
+               disk_opts=${OPTARG#${disk_dev}}
+               eval "disk_dev${disk_total}=\"${disk_dev}\""
+               eval "disk_opts${disk_total}=\"${disk_opts}\""
                disk_total=$(($disk_total + 1))
                ;;
        e)
@@ -237,8 +240,9 @@ while [ 1 ]; do
        i=0
        while [ $i -lt $disk_total ] ; do
            eval "disk=\$disk_dev${i}"
+           eval "opts=\$disk_opts${i}"
            make_and_check_diskdev "${disk}"
-           devargs="$devargs -s $nextslot:0,virtio-blk,${disk} "
+           devargs="$devargs -s $nextslot:0,virtio-blk,${disk}${opts} "
            nextslot=$(($nextslot + 1))
            i=$(($i + 1))
        done
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to