summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-12-07 15:45:00 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2009-12-07 15:45:00 -0200
commit3a71daee86d112f33d0a222fa18decca7fffe6a1 (patch)
tree160e3ce570c12673603ac01e81dbe1174e99d24b
parent77d495d52019d0d262b54cca26e7b82a237f8032 (diff)
downloadtuna-3a71daee86d112f33d0a222fa18decca7fffe6a1.tar.gz
cmdline: --priority/-p requires a thread list
Next csets will try to transform an irq_list into a thread list if running on a threaded interrupts kernel, so that 'tuna -q list -p fifo:90', for instance, works. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-xtuna-cmd.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 21ee97a..cf1f3fb 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -469,6 +469,9 @@ def main():
sys.exit(2)
tuna.include_cpus(cpu_list, get_nr_cpus())
elif o in ("-p", "--priority"):
+ if not thread_list:
+ print "tuna: --what_is " + _("requires a thread list!")
+ sys.exit(2)
tuna.threads_set_priority(thread_list, a, affect_children)
elif o in ("-P", "--show_threads"):
# If the user specified process names that weren't