X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/7eb76ebc9a88b14553713f8d214bb8d04f10dbc2..aef05b788c268d43559a0183d1efe9c458724b94:/unix/uxplink.c diff --git a/unix/uxplink.c b/unix/uxplink.c index 1daafe4b..38129f96 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(); }