X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=unix%2Fuxplink.c;h=1d3db4c26f253f8b82bc31d4725b176180e9c403;hb=631b4948073922c2618441fb374c7e6fc22bd1d8;hp=1daafe4be650bbf4725ae9fcce1f6eb3386cb1ff;hpb=c353c3cc972c611a37994704bb61b0d45999b0ab;p=PuTTY.git diff --git a/unix/uxplink.c b/unix/uxplink.c index 1daafe4b..1d3db4c2 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -82,6 +82,8 @@ char *platform_default_s(const char *name) return dupstr(getenv("TERM")); if (!strcmp(name, "UserName")) return get_username(); + if (!strcmp(name, "SerialLine")) + return dupstr("/dev/ttyS0"); return NULL; } @@ -627,7 +629,7 @@ int main(int argc, char **argv) errors = 1; } } else if (*p) { - if (!*cfg.host) { + if (!cfg_launchable(&cfg)) { char *q = p; /* @@ -701,7 +703,7 @@ int main(int argc, char **argv) { Config cfg2; do_defaults(host, &cfg2); - if (loaded_session || cfg2.host[0] == '\0') { + if (loaded_session || !cfg_launchable(&cfg2)) { /* No settings for this host; use defaults */ /* (or session was already loaded with -load) */ strncpy(cfg.host, host, sizeof(cfg.host) - 1); @@ -755,7 +757,7 @@ int main(int argc, char **argv) if (errors) return 1; - if (!*cfg.host) { + if (!cfg_launchable(&cfg)) { usage(); } @@ -811,7 +813,7 @@ int main(int argc, char **argv) cfg.host[p1] = '\0'; } - if (!cfg.remote_cmd_ptr && !*cfg.remote_cmd) + if (!cfg.remote_cmd_ptr && !*cfg.remote_cmd && !*cfg.ssh_nc_host) flags |= FLAG_INTERACTIVE; /*