Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
Added -h option to geoiplookup6.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsafrane authored and oschwald committed May 14, 2013
1 parent 1127260 commit 80b22d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/geoiplookup6.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
void geoiplookup(GeoIP* gi,char *hostname,int i);

void usage() {
fprintf(stderr,"Usage: geoiplookup [-d custom_dir] [-f custom_file] [-v] <ipaddress|hostname>\n");
fprintf(stderr,"Usage: geoiplookup [-h] [-d custom_dir] [-f custom_file] [-v] <ipaddress|hostname>\n");
}

int main (int argc, char *argv[]) {
Expand All @@ -44,6 +44,10 @@ int main (int argc, char *argv[]) {
while (i < argc) {
if (strcmp(argv[i],"-v") == 0) {
version_flag = 1;
} else if (strcmp(argv[i], "-h") == 0
|| strcmp(argv[i], "-?") == 0) {
usage();
exit(0);
} else if (strcmp(argv[i],"-f") == 0) {
if ((i+1) < argc){
i++;
Expand Down

0 comments on commit 80b22d2

Please sign in to comment.