Mercurial > dropbear
comparison dbmulti.c @ 4:fe6bca95afa7
Makefile.in contains updated files required
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 01 Jun 2004 02:46:09 +0000 |
parents | |
children | 223b0f5f8dce |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 4:fe6bca95afa7 |
---|---|
1 #include "includes.h" | |
2 | |
3 /* definitions are cleanest if we just put them here */ | |
4 int dropbear_main(int argc, char ** argv); | |
5 int dropbearkey_main(int argc, char ** argv); | |
6 int dropbearconvert_main(int argc, char ** argv); | |
7 | |
8 int main(int argc, char ** argv) { | |
9 | |
10 char * progname; | |
11 | |
12 if (argc > 0) { | |
13 /* figure which form we're being called as */ | |
14 progname = basename(argv[0]); | |
15 | |
16 #ifdef DBMULTI_DROPBEAR | |
17 if (strcmp(progname, "dropbear") == 0) { | |
18 return dropbear_main(argc, argv); | |
19 } | |
20 #endif | |
21 #ifdef DBMULTI_KEY | |
22 if (strcmp(progname, "dropbearkey") == 0) { | |
23 return dropbearkey_main(argc, argv); | |
24 } | |
25 #endif | |
26 #ifdef DBMULTI_CONVERT | |
27 if (strcmp(progname, "dropbearconvert") == 0) { | |
28 return dropbearconvert_main(argc, argv); | |
29 } | |
30 #endif | |
31 } | |
32 | |
33 fprintf(stderr, "Dropbear multi-purpose version %s\n" | |
34 "Make a symlink pointing at this binary with one of the following names:\n" | |
35 #ifdef DBMULTI_DROPBEAR | |
36 "'dropbear' - the Dropbear server\n" | |
37 #endif | |
38 #ifdef DBMULTI_KEY | |
39 "'dropbearkey' - the key generator\n" | |
40 #endif | |
41 #ifdef DBMULTI_CONVERT | |
42 "'dropbearconvert' - the key converter\n" | |
43 #endif | |
44 , | |
45 DROPBEAR_VERSION); | |
46 exit(1); | |
47 | |
48 } |