diff options
author | Yordan Karadzhov (VMware) <y.karadz@gmail.com> | 2019-07-23 15:52:03 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-07-23 16:31:36 -0400 |
commit | 9f25e6fd0a66e9fca814e45c28bd97f3bc15c99f (patch) | |
tree | 0e8320b5797945b0dc8fbec96e49d936b9d6781e | |
parent | 41f08adfb323b0a8be52048933f753a929f5621e (diff) | |
download | trace-cmd-9f25e6fd0a66e9fca814e45c28bd97f3bc15c99f.tar.gz |
kernel-shark: Better error message for the constructor of KsCaptureControl
The error message includes the case when the tracing directory cannot be
found or mounted.
Link: http://lore.kernel.org/linux-trace-devel/20190723125204.22799-3-y.karadz@gmail.com
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | kernel-shark/src/KsCaptureDialog.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/kernel-shark/src/KsCaptureDialog.cpp b/kernel-shark/src/KsCaptureDialog.cpp index 0a295188..2e6e8f9c 100644 --- a/kernel-shark/src/KsCaptureDialog.cpp +++ b/kernel-shark/src/KsCaptureDialog.cpp @@ -55,13 +55,19 @@ KsCaptureControl::KsCaptureControl(QWidget *parent) _topLayout.addWidget(line); }; - if (pluginList.count() == 0) { + if (pluginList.count() == 0 || !_localTEP) { /* - * No plugins have been found. Most likely this is because - * the process has no Root privileges. + * No plugins or events have been found. Most likely this is + * because the process has no Root privileges or because + * tracefs cannot be mounted. */ QString message("Error: No events or plugins found.\n"); - message += "Root privileges are required."; + + if (!_localTEP) + message += "Cannot find or mount tracing directory.\n"; + if (!pluginList.count()) + message += "Root privileges are required.\n"; + QLabel *errorLabel = new QLabel(message); errorLabel->setStyleSheet("QLabel {color : red;}"); |