Skip to content

Commit

Permalink
Remove unused scripts and code
Browse files Browse the repository at this point in the history
Signed-off-by: Qin Zhang <[email protected]>
  • Loading branch information
qinz0822 authored and MarkSymsCtx committed Oct 9, 2023
1 parent 5deac9e commit 7e2a342
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 73 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ install: precheck
ln -sf $(SM_DEST)lcache.py $(SM_STAGING)$(BIN_DEST)tapdisk-cache-stats
ln -sf /dev/null $(SM_STAGING)$(UDEV_RULES_DIR)/69-dm-lvm-metad.rules
install -m 755 scripts/xs-mpath-scsidev.sh $(SM_STAGING)$(UDEV_SCRIPTS_DIR)
install -m 755 scripts/xe-getarrayidentifier $(SM_STAGING)$(BIN_DEST)
install -m 755 scripts/xe-getlunidentifier $(SM_STAGING)$(BIN_DEST)
install -m 755 scripts/make-dummy-sr $(SM_STAGING)$(LIBEXEC)
install -m 755 scripts/storage-init $(SM_STAGING)$(LIBEXEC)

Expand Down
10 changes: 0 additions & 10 deletions drivers/scsiutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,16 +357,6 @@ def rescan(ids, fullrescan=True):
refresh_HostID(id, fullrescan)


def _genArrayIdentifier(dev):
try:
cmd = ["sg_inq", "--page=0xc8", "-r", dev]
id = util.pread2(cmd)
#pylint: disable=no-member
return id.encode("hex")[180:212]
except:
return ""


def _genHostList(procname):
# loop through and check all adapters
ids = []
Expand Down
22 changes: 6 additions & 16 deletions drivers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,16 +1232,6 @@ def daemon():
os.open('/dev/null', os.O_RDWR)
os.dup2(0, 1)
os.dup2(0, 2)
#########################

if __debug__:
try:
#pylint: disable=used-before-assignment
XE_IOFI_IORETRY
except NameError:
XE_IOFI_IORETRY = os.environ.get('XE_IOFI_IORETRY', None)
if __name__ == 'util' and XE_IOFI_IORETRY is not None:
__import__('iofi')

################################################################################
#
Expand Down Expand Up @@ -1777,18 +1767,18 @@ def hideValuesInPropMap(propmap, propnames):

def hidePasswdInConfig(config):
"""
Function to hide passwd values in a simple prop map,
Function to hide passwd values in a simple prop map,
for example "device_config"
"""
return hideValuesInPropMap(config, PASSWD_PROP_KEYS)


def hidePasswdInParams(params, configProp):
"""
Function to hide password values in a specified property which
Function to hide password values in a specified property which
is a simple map of prop name/values, and is itself an prop entry
in a larger property map.
For example, param maps containing "device_config", or
For example, param maps containing "device_config", or
"sm_config", etc
"""
params[configProp] = hideValuesInPropMap(params[configProp], PASSWD_PROP_KEYS)
Expand All @@ -1797,11 +1787,11 @@ def hidePasswdInParams(params, configProp):

def hideMemberValuesInXmlParams(xmlParams, propnames=PASSWD_PROP_KEYS):
"""
Function to hide password values in XML params, specifically
Function to hide password values in XML params, specifically
for the XML format of incoming params to SR modules.
Uses text parsing: loop through the list of specific propnames
Uses text parsing: loop through the list of specific propnames
whose values we want to hide, and:
- Assemble a full "prefix" containing each property name, e.g.,
- Assemble a full "prefix" containing each property name, e.g.,
"<member><name>password</name><value>"
- Test the XML if it contains that string, save the index.
- If found, get the index of the ending tag
Expand Down
2 changes: 0 additions & 2 deletions mk/sm.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ tests/run_python_unittests.sh
/etc/xensource/master.d/02-vhdcleanup
/opt/xensource/bin/blktap2
/opt/xensource/bin/tapdisk-cache-stats
/opt/xensource/bin/xe-getarrayidentifier
/opt/xensource/bin/xe-getlunidentifier
/opt/xensource/debug/tp
/opt/xensource/libexec/check-device-sharing
/opt/xensource/libexec/dcopy
Expand Down
21 changes: 0 additions & 21 deletions scripts/xe-getarrayidentifier

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/xe-getlunidentifier

This file was deleted.

0 comments on commit 7e2a342

Please sign in to comment.