mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Add -V for version information to plink, pscp, and psftp.
[originally from svn r4092]
This commit is contained in:
parent
ad37aabb08
commit
6863377b72
9
plink.c
9
plink.c
@ -233,6 +233,13 @@ static void usage(void)
|
|||||||
printf(" -C enable compression\n");
|
printf(" -C enable compression\n");
|
||||||
printf(" -i key private key file for authentication\n");
|
printf(" -i key private key file for authentication\n");
|
||||||
printf(" -s remote command is an SSH subsystem (SSH-2 only)\n");
|
printf(" -s remote command is an SSH subsystem (SSH-2 only)\n");
|
||||||
|
printf(" -V print version information\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void version(void)
|
||||||
|
{
|
||||||
|
printf("plink: %s\n", ver);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,6 +333,8 @@ int main(int argc, char **argv)
|
|||||||
} else if (!strcmp(p, "-s")) {
|
} else if (!strcmp(p, "-s")) {
|
||||||
/* Save status to write to cfg later. */
|
/* Save status to write to cfg later. */
|
||||||
use_subsystem = 1;
|
use_subsystem = 1;
|
||||||
|
} else if (!strcmp(p, "-V")) {
|
||||||
|
version();
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "plink: unknown option \"%s\"\n", p);
|
fprintf(stderr, "plink: unknown option \"%s\"\n", p);
|
||||||
errors = 1;
|
errors = 1;
|
||||||
|
9
psftp.c
9
psftp.c
@ -1779,6 +1779,13 @@ static void usage(void)
|
|||||||
printf(" -C enable compression\n");
|
printf(" -C enable compression\n");
|
||||||
printf(" -i key private key file for authentication\n");
|
printf(" -i key private key file for authentication\n");
|
||||||
printf(" -batch disable all interactive prompts\n");
|
printf(" -batch disable all interactive prompts\n");
|
||||||
|
printf(" -V print version information\n");
|
||||||
|
cleanup_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void version(void)
|
||||||
|
{
|
||||||
|
printf("psftp: %s\n", ver);
|
||||||
cleanup_exit(1);
|
cleanup_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2010,6 +2017,8 @@ int psftp_main(int argc, char *argv[])
|
|||||||
} else if (strcmp(argv[i], "-h") == 0 ||
|
} else if (strcmp(argv[i], "-h") == 0 ||
|
||||||
strcmp(argv[i], "-?") == 0) {
|
strcmp(argv[i], "-?") == 0) {
|
||||||
usage();
|
usage();
|
||||||
|
} else if (strcmp(argv[i], "-V") == 0) {
|
||||||
|
version();
|
||||||
} else if (strcmp(argv[i], "-batch") == 0) {
|
} else if (strcmp(argv[i], "-batch") == 0) {
|
||||||
console_batch_mode = 1;
|
console_batch_mode = 1;
|
||||||
} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {
|
} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {
|
||||||
|
9
scp.c
9
scp.c
@ -2064,6 +2064,7 @@ static void usage(void)
|
|||||||
printf(" -i key private key file for authentication\n");
|
printf(" -i key private key file for authentication\n");
|
||||||
printf(" -batch disable all interactive prompts\n");
|
printf(" -batch disable all interactive prompts\n");
|
||||||
printf(" -unsafe allow server-side wildcards (DANGEROUS)\n");
|
printf(" -unsafe allow server-side wildcards (DANGEROUS)\n");
|
||||||
|
printf(" -V print version information\n");
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* -gui is an internal option, used by GUI front ends to get
|
* -gui is an internal option, used by GUI front ends to get
|
||||||
@ -2078,6 +2079,12 @@ static void usage(void)
|
|||||||
cleanup_exit(1);
|
cleanup_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void version(void)
|
||||||
|
{
|
||||||
|
printf("pscp: %s\n", ver);
|
||||||
|
cleanup_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
void cmdline_error(char *p, ...)
|
void cmdline_error(char *p, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
@ -2129,6 +2136,8 @@ int psftp_main(int argc, char *argv[])
|
|||||||
statistics = 0;
|
statistics = 0;
|
||||||
} else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-?") == 0) {
|
} else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-?") == 0) {
|
||||||
usage();
|
usage();
|
||||||
|
} else if (strcmp(argv[i], "-V") == 0) {
|
||||||
|
version();
|
||||||
} else if (strcmp(argv[i], "-gui") == 0 && i + 1 < argc) {
|
} else if (strcmp(argv[i], "-gui") == 0 && i + 1 < argc) {
|
||||||
gui_enable(argv[++i]);
|
gui_enable(argv[++i]);
|
||||||
gui_mode = 1;
|
gui_mode = 1;
|
||||||
|
@ -231,6 +231,13 @@ static void usage(void)
|
|||||||
printf(" -C enable compression\n");
|
printf(" -C enable compression\n");
|
||||||
printf(" -i key private key file for authentication\n");
|
printf(" -i key private key file for authentication\n");
|
||||||
printf(" -s remote command is an SSH subsystem (SSH-2 only)\n");
|
printf(" -s remote command is an SSH subsystem (SSH-2 only)\n");
|
||||||
|
printf(" -V print version information\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void version(void)
|
||||||
|
{
|
||||||
|
printf("plink: %s\n", ver);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,6 +308,8 @@ int main(int argc, char **argv)
|
|||||||
} else if (!strcmp(p, "-s")) {
|
} else if (!strcmp(p, "-s")) {
|
||||||
/* Save status to write to cfg later. */
|
/* Save status to write to cfg later. */
|
||||||
use_subsystem = 1;
|
use_subsystem = 1;
|
||||||
|
} else if (!strcmp(p, "-V")) {
|
||||||
|
version();
|
||||||
} else if (!strcmp(p, "-o")) {
|
} else if (!strcmp(p, "-o")) {
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
Loading…
Reference in New Issue
Block a user