patch = MK_PLATFORM_PATCH(version);
// eshell to support from the 2.4.0 version.
- if (major >= 3 || (major >= 2 && minor >=4)) {
- if(get_screensize(&lines, &columns) == 0) {
- snprintf(eshell+7, sizeof(eshell)-7, "%d:%d", lines, columns);
- D("interactive shell : eshell command=%s\n", eshell);
- fd = sdb_connect(eshell);
- if(fd < 0) {
- fprintf(stdout, "failed environment shell, so it will retry shell command.\n");
- return 1;
- }
+ if ((major >= 3 || (major >= 2 && minor >=4)) && (get_screensize(&lines, &columns) == 0)) {
+ snprintf(eshell+7, sizeof(eshell)-7, "%d:%d", lines, columns);
+ D("interactive shell : eshell command=%s\n", eshell);
+ fd = sdb_connect(eshell);
+ if(fd < 0) {
+ fprintf(stdout, "failed environment shell, so it will retry shell command.\n");
}
-
if(check_syncwinsz_support() == 1) {
D("Support sync window size with remote\n");
enable_sync_winsz = 1;
}
- } else {
+ }
+
+ if (fd < 0) {
fd = sdb_connect("shell:");
if(fd < 0) {
return 1;