Skip to content

Commit

Permalink
Finished Release v0.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnon Yaari committed Apr 24, 2017
2 parents ded453b + 54d902c commit 2445858
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pre_uninstall_script_name = None

[isolated-python]
recipe = infi.recipe.python
version = v2.7.8.5
version = v2.7.8.10

[setup.py]
recipe = infi.recipe.template.version
Expand Down
8 changes: 5 additions & 3 deletions src/infi/sgutils/ioctl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def scsi_ioctl_get_idlun(device_path):

def scsi_ioctl_get_bus_number(device_path):
""":returns: a :class:`.SG_GET_SCSI_ID` object"""
from ctypes import c_ulong
buffer = c_ulong()
from ctypes import c_buffer
import struct
buffer = c_buffer(4)
result = ioctl(device_path, opcodes.SCSI_IOCTL_GET_BUS_NUMBER, buffer)
return buffer.value
# using @I due to STORAGEMODEL-385
return struct.unpack("@I", buffer.raw)[0]

0 comments on commit 2445858

Please sign in to comment.