aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Hufmann2012-12-20 10:17:01 (EST)
committerBernd Hufmann2012-12-20 10:50:15 (EST)
commit99de5a95f61d49f517261ed6be2e86049f2f9aac (patch)
tree3e36b9f27f5dbfda26fb0472df8a15992d91bb95
parent295b6fb8f5622c0f2cb816981594aefb3e3dcf27 (diff)
downloadorg.eclipse.linuxtools-99de5a95f61d49f517261ed6be2e86049f2f9aac.zip
org.eclipse.linuxtools-99de5a95f61d49f517261ed6be2e86049f2f9aac.tar.gz
org.eclipse.linuxtools-99de5a95f61d49f517261ed6be2e86049f2f9aac.tar.bz2
Adjust list kernel events handling due to new output formatrefs/changes/28/9328/2
lttng-tools 2.1 has a different string output for command lttng list -k if no kernel tracer is available. This fix adjust the command output parsing to ignore this case correctly. Change-Id: Ibfc8fd19609b6489e5ef9fd31ba75058ea0f6631 Reviewed-on: https://git.eclipse.org/r/9328 Tested-by: Bernd Hufmann <bhufmann@gmail.com> Tested-by: Hudson CI Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java b/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java
index 3a3b375..a533cbb 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlService.java
@@ -236,8 +236,9 @@ public class LTTngControlService implements ILttngControlService {
// Error: Unable to list kernel events
// or:
// Error: Unable to list kernel events
+ //
- if ((result.getOutput().length == 1) && (LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN.matcher(result.getOutput()[0]).matches()) ||
+ if ((result.getOutput().length > 0) && (LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN.matcher(result.getOutput()[0]).matches()) ||
((result.getOutput().length > 1) && (LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN.matcher(result.getOutput()[1]).matches()))) {
return events;
}