summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2015-12-04 10:25:50 -0800
committerAndy Grover <agrover@redhat.com>2015-12-04 10:25:50 -0800
commit8b927cc95cdb426cfca85793d965e0c2eb961914 (patch)
tree9d4830d2c31886a395078b8a794d1a7e16d64aa9
parent339fef04ef1e265e55d578bf506abe7885ab356e (diff)
downloadtargetcli-8b927cc95cdb426cfca85793d965e0c2eb961914.tar.gz
fileio completions also allow block devices
fileio can handle both files and block devices. Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r--targetcli/ui_backstore.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py
index fd1766e..a0b90ba 100644
--- a/targetcli/ui_backstore.py
+++ b/targetcli/ui_backstore.py
@@ -379,7 +379,7 @@ class UIFileIOBackstore(UIBackstore):
'''
if current_param != 'file_or_dev':
return []
- completions = complete_path(text, stat.S_ISREG)
+ completions = complete_path(text, lambda x: stat.S_ISREG(x) or stat.S_ISBLK(x))
if len(completions) == 1 and not completions[0].endswith('/'):
completions = [completions[0] + ' ']
return completions