~ubuntu-branches/ubuntu/utopic/openipmi/utopic-proposed

« back to all changes in this revision

Viewing changes to sample/sample.c

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2007-06-21 19:48:32 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070621194832-nqtxvxn4pu3ha3gh
Tags: 2.0.11-1
* new upstream release from 2007-02-25
  (closes: Bug#392788)
* added patch parts from Philipp Matthias Hahn <pmhahn@debian.org>
  Thank you!

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
static const char *progname;
58
58
 
 
59
static void con_usage(const char *name, const char *help, void *cb_data)
 
60
{
 
61
    printf("\n%s%s", name, help);
 
62
}
 
63
 
59
64
static void
60
65
usage(void)
61
66
{
62
 
    printf("Usage:\n"
63
 
           "  %s [options] smi <smi #>\n"
64
 
           "     Make a connection to a local system management interface.\n"
65
 
           "     smi # is generally 0.\n"
66
 
           "  %s [options] lan <host> <port> <authtype> <privilege>"
67
 
           " <username> <password>\n"
68
 
           "     Make a connection to a IPMI 1.5 LAN interface.\n"
69
 
           "     Host and port specify where to connect to (port is\n"
70
 
           "     generally 623).  authtype is none, md2, md5, or straight.\n"
71
 
           "     privilege is callback, user, operator, or admin.  The\n"
72
 
           "     username and password must be provided if the authtype is\n"
73
 
           "     not none.\n", progname, progname);
 
67
    printf("Usage:\n");
 
68
    printf(" %s <con_parms>\n", progname);
 
69
    printf(" Where <con_parms> is one of:");
 
70
    ipmi_parse_args_iter_help(con_usage, NULL);
74
71
}
75
72
 
76
73
static int
441
438
#endif
442
439
 
443
440
#if 1
444
 
    rv = ipmi_parse_args(&curr_arg, argc, argv, &args);
 
441
    rv = ipmi_parse_args2(&curr_arg, argc, argv, &args);
445
442
    if (rv) {
446
443
        fprintf(stderr, "Error parsing command arguments, argument %d: %s\n",
447
444
                curr_arg, strerror(rv));