Skip to content

Commit

Permalink
Possible fix for some passthru devices not working
Browse files Browse the repository at this point in the history
  • Loading branch information
churchers committed Jun 6, 2016
1 parent 9119310 commit 30834ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/vm-run
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ __vm_bhyve_device_rand(){
# @modifies _devices _slot _opts _wiredmem
#
__vm_bhyve_device_passthru(){
local _dev _orig_slot _orig_func
local _dev _orig_slot _func=0
local _last_orig_slot
local _num=0

Expand All @@ -469,14 +469,14 @@ __vm_bhyve_device_passthru(){
# on one slot, they should be together in configuration file
if [ -n "${_last_orig_slot}" -a "${_last_orig_slot}" != "${_orig_slot}" ]; then
_slot=$((_slot + 1))
_func=0
fi

# we use the original function number for all devices.
# does this work if you only pass through function 1 or 2, and leave 0 empty?
_devices="${_devices} -s ${_slot}:${_orig_func},passthru,${_dev}"
_devices="${_devices} -s ${_slot}:${_func},passthru,${_dev}"
_last_orig_slot=${_orig_slot}

_num=$((_num + 1))
_func=$((_func + 1))
done

if [ ${_num} -ge 1 ]; then
Expand Down
4 changes: 2 additions & 2 deletions vm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

VERSION=1.0-p3
VERSION_INT=100011
VERSION=1.0-p4
VERSION_INT=100012
VERSION_BSD=$(uname -K)
PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

Expand Down

0 comments on commit 30834ec

Please sign in to comment.