version 1.92, 2001/02/06 23:06:21 |
version 1.93, 2001/02/08 19:30:52 |
|
|
/* Prints a help message to the user. This function never returns. */ |
/* Prints a help message to the user. This function never returns. */ |
|
|
void |
void |
usage() |
usage(void) |
{ |
{ |
fprintf(stderr, "Usage: %s [options] host [command]\n", __progname); |
fprintf(stderr, "Usage: %s [options] host [command]\n", __progname); |
fprintf(stderr, "Options:\n"); |
fprintf(stderr, "Options:\n"); |
fprintf(stderr, " -l user Log in using this user name.\n"); |
fprintf(stderr, " -l user Log in using this user name.\n"); |
fprintf(stderr, " -n Redirect input from /dev/null.\n"); |
fprintf(stderr, " -n Redirect input from " _PATH_DEVNULL ".\n"); |
fprintf(stderr, " -A Enable authentication agent forwarding.\n"); |
fprintf(stderr, " -A Enable authentication agent forwarding.\n"); |
fprintf(stderr, " -a Disable authentication agent forwarding.\n"); |
fprintf(stderr, " -a Disable authentication agent forwarding.\n"); |
#ifdef AFS |
#ifdef AFS |
|
|
|
|
if (options.xauth_location) { |
if (options.xauth_location) { |
/* Try to get Xauthority information for the display. */ |
/* Try to get Xauthority information for the display. */ |
snprintf(line, sizeof line, "%.100s list %.200s 2>/dev/null", |
snprintf(line, sizeof line, "%.100s list %.200s 2>" _PATH_DEVNULL, |
options.xauth_location, getenv("DISPLAY")); |
options.xauth_location, getenv("DISPLAY")); |
f = popen(line, "r"); |
f = popen(line, "r"); |
if (f && fgets(line, sizeof(line), f) && |
if (f && fgets(line, sizeof(line), f) && |
|
|
int in, out, err; |
int in, out, err; |
|
|
if (stdin_null_flag) { |
if (stdin_null_flag) { |
in = open("/dev/null", O_RDONLY); |
in = open(_PATH_DEVNULL, O_RDONLY); |
} else { |
} else { |
in = dup(STDIN_FILENO); |
in = dup(STDIN_FILENO); |
} |
} |