From 82342164e2aeaadc18af07c60cb3b2951dbdea4f Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Tue, 3 May 2016 16:53:19 -0400 Subject: [PATCH] Add support for QNX connections over SSH. Change-Id: I8797b8cbb40967992c0d0b37fe6e2b5e79f92e6e --- .../remote/internal/jsch/core/JSchConnection.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchConnection.java b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchConnection.java index 9095be92a73..758b99319e1 100644 --- a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchConnection.java +++ b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchConnection.java @@ -253,9 +253,9 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC private final IRemoteConnection fRemoteConnection; private final IJSchService fJSchService; - private final Map fEnv = new HashMap(); - private final Map fProperties = new HashMap(); - private final List fSessions = new ArrayList(); + private final Map fEnv = new HashMap<>(); + private final Map fProperties = new HashMap<>(); + private final List fSessions = new ArrayList<>(); private ChannelSftp fSftpCommandChannel; private boolean isFullySetup; // including sftp channel and environment @@ -897,6 +897,12 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC encoding = executeCommand("locale charmap", subMon.newChild(10)); //$NON-NLS-1$ break; + case "qnx": //$NON-NLS-1$ + osArch = executeCommand("uname -p", subMon.newChild(10)); //$NON-NLS-1$ + osVersion = executeCommand("uname -r", subMon.newChild(10)); //$NON-NLS-1$ + encoding = "UTF-8"; //$NON-NLS-1$ + break; + default: osVersion = "unknown"; //$NON-NLS-1$ osArch = "unknown"; //$NON-NLS-1$