Changeset 19124 for trunk/Ohana/src/opihi/pcontrol/host.c
- Timestamp:
- Aug 19, 2008, 12:28:34 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pcontrol/host.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pcontrol/host.c
r18098 r19124 3 3 int host (int argc, char **argv) { 4 4 5 int N, max_threads; 5 6 IDtype HostID; 6 7 Host *host; 7 8 Stack *AllHosts; 9 10 max_threads = 0; 11 if ((N = get_argument (argc, argv, "-threads"))) { 12 remove_argument (N, &argc, argv); 13 max_threads = atoi(argv[N]); 14 remove_argument (N, &argc, argv); 15 } 8 16 9 17 if (argc != 3) goto usage; … … 12 20 13 21 if (!strcasecmp (argv[1], "ADD")) { 14 HostID = AddHost (argv[2] );22 HostID = AddHost (argv[2], max_threads); 15 23 gprint (GP_LOG, "HostID: %d\n", (int) HostID); 16 24 return (TRUE); 17 25 } 26 27 if (max_threads) goto usage; 18 28 19 29 // this one is safe from in-flight entries: no one else pulls from OFF … … 87 97 gprint (GP_LOG, "USAGE: host (command) (hostname)\n"); 88 98 gprint (GP_ERR, " valid commands: add, on, retry, check, off, delete\n"); 99 gprint (GP_ERR, " -threads Nthreads is optional for 'add'\n"); 89 100 return (FALSE); 90 101 }
Note:
See TracChangeset
for help on using the changeset viewer.
