History

add -O option to disable new rcpu protocol, accept -h option just like cpu

cinap_lenrek committed 10 years ago

Commit c1f45eb1 parent 1077af51 file · +11 −5Browse files

Unified · Split

cpu.c+11−5
@@ -27,6 +27,7 @@ static int getkey(Authkey*, char*, char*, char*); · 26 unmodified lines
2727 static int findkey(Authkey*, char*, char*, char*);
2828
2929 static char *host;
30+static int norcpu;
3031 static int nokbd;
3132 static int cflag;
3233 extern int dbg;
@@ -50,7 +51,7 @@ exits(char *s) · 17 unmodified lines
5051 void
5152 usage(void)
5253 {
53− fprint(2, "usage: drawterm [-a authserver] [-c cpuserver] [-s secstore] [-u user] [-r root]\n");
54+ fprint(2, "usage: drawterm [-BOp] [-h host | -c cpuserver] [-a authserver] [-s secstore] [-u user] [-r root]\n");
5455 exits("usage");
5556 }
5657
@@ -200,6 +201,7 @@ cpumain(int argc, char **argv) · 143 unmodified lines
200201 case 'a':
201202 authserver = EARGF(usage());
202203 break;
204+ case 'h':
203205 case 'c':
204206 host = EARGF(usage());
205207 break;
@@ -226,18 +228,21 @@ cpumain(int argc, char **argv) · 20 unmodified lines
226228 strcat(cmd, p);
227229 }
228230 break;
229− case 'k':
230− keyspec = EARGF(usage());
231− break;
232231 case 's':
233232 secstoreserver = EARGF(usage());
234233 break;
234+ case 'k':
235+ keyspec = EARGF(usage());
236+ break;
235237 case 'u':
236238 user = EARGF(usage());
237239 break;
238240 case 'B':
239241 nokbd = 1;
240242 break;
243+ case 'O':
244+ norcpu = 1;
245+ break;
241246 case 'p':
242247 aanfilter = 1;
243248 break;
@@ -273,7 +278,8 @@ cpumain(int argc, char **argv) · 29 unmodified lines
273278 }
274279 }
275280
276− rcpu(host);
281+ if(!norcpu)
282+ rcpu(host);
277283
278284 if((err = rexcall(&data, host, srvname)))
279285 fatal(1, "%s: %s", err, host);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t