IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37462


Ignore:
Timestamp:
Oct 4, 2014, 5:52:22 PM (12 years ago)
Author:
eugene
Message:

add support for controller options

Location:
branches/eam_branches/ipp-20140904/Ohana/src/opihi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/opihi/pantasks/controller_status.c

    r23530 r37462  
    33int controller_status (int argc, char **argv) {
    44
    5   int status;
    6   char command[1024];
     5  int i, status;
     6  char command[1024], tmpline[1024];
    77  IOBuffer buffer;
    88
    9   if (argc != 1) {
    10     gprint (GP_ERR, "USAGE: controller status\n");
     9  if ((argc > 1) && (!strcasecmp(argv[1], "help")))  {
     10    gprint (GP_ERR, "USAGE: controller status [options]\n");
     11    gprint (GP_ERR, "  OPTIONS:\n");
     12    gprint (GP_ERR, "  -cmd command\n");
     13    gprint (GP_ERR, "  -host hostname\n");
     14    gprint (GP_ERR, "  -state state\n");
     15    gprint (GP_ERR, "  -age seconds\n");
     16    gprint (GP_ERR, "  +jobs [-nohost]\n");
     17    gprint (GP_ERR, "  +host [-nojobs]\n");
    1118    return (FALSE);
    1219  }
     
    1926  }
    2027
     28  snprintf (command, 1024, "status");
     29  for (i = 1; i < argc; i++) {
     30    snprintf (tmpline, 1024, "%s %s", command, argv[i]);
     31    strcpy (command, tmpline);
     32  }
    2133
    22   sprintf (command, "status");
    2334  InitIOBuffer (&buffer, 0x100);
    2435
  • branches/eam_branches/ipp-20140904/Ohana/src/opihi/pcontrol/status.c

    r36623 r37462  
    8585
    8686usage:
    87   gprint (GP_ERR, "USAGE: status [-cmd command] [-host hostname] [-state state] [-age seconds] [+jobs,-nohost] [+host,-nojobs]\n");
     87  gprint (GP_LOG, "USAGE: status [-cmd command] [-host hostname] [-state state] [-age seconds] [+jobs,-nohost] [+host,-nojobs]\n");
    8888  return FALSE;
    8989}
Note: See TracChangeset for help on using the changeset viewer.