Fix 'dummy' HPSS ioctl code

In order for the unit test suite to run happily without HPSS installed,
some dummy implementation of the ioctl() call normally given by the
'hpssfs' module needed to be added. This was done when bringing the code
into a known good state, but the implementation would not actually work
and that seemed like it would be an issue down the road. So here's an
actually working implementation of that.

Change-Id: I52c8ede8ac2d38bb59c2d7d2fb399fd65e75577a
This commit is contained in:
Phil Bridges 2016-06-21 18:24:38 -05:00
parent de609374f7
commit ad9cd13c2c
1 changed files with 4 additions and 3 deletions

View File

@ -34,7 +34,8 @@ HPSSFS_UNDELETE_OVERWRITE_AND_RESTORE = 0x00000003
def ioctl(fd, cmd, val=None):
if val is not None:
valbuf = array.array("i", val)
fcntl.ioctl(fd, cmd, valbuf)
valbuf = array.array('i', [0])
else:
fcntl.ioctl(fd, cmd)
valbuf = array.array('i', [val])
fcntl.ioctl(fd, cmd, valbuf)
return valbuf[0]