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

« back to all changes in this revision

Viewing changes to sample/ipmicmd.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-02-12 12:49:05 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080212124905-xw8ujcbfoukkpkau
Tags: 2.0.13-0ubuntu1
* New upstream release.
* Cleaned up debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
        return -1;
380
380
 
381
381
    if (strcmp(v, "help") == 0) {
 
382
        /* Strange that anyone would try this when not in interactive mode,
 
383
         * but it is possible */
 
384
        if (!interactive)
 
385
                return -1;
 
386
 
382
387
        printf("Commands are:\n");
383
388
        printf("  regcmd <netfn> <cmd> - Register to receive this cmd\n");
384
389
        printf("  unregcmd <netfn> <cmd> - Unregister to receive this cmd\n");
588
593
        leave(1);
589
594
    }
590
595
    if (count == 0) {
591
 
        if( interactive)
 
596
        if (interactive)
592
597
            printf("\n"); 
593
598
        con->close_connection(con);
594
599
        continue_operation = 0;
603
608
            for (j=0; j<count; j++)
604
609
                input_line[j] = input_line[j+pos];
605
610
            pos = 0;
606
 
            if( interactive )
 
611
            if (interactive )
607
612
                printf("=> "); 
608
613
            fflush(stdout);
609
614
        } else {
636
641
        }
637
642
        if (!interactive_done) {
638
643
            interactive_done = 1;
639
 
            process_input_line(cmdstr);
 
644
            if (process_input_line(cmdstr))
 
645
                    continue_operation = 0;
640
646
        }
641
647
    } else {
642
648
        if (err)