Imported Upstream version 2.7.1
This commit is contained in:
parent
a1fa151fc7
commit
0121794af9
451 changed files with 41339 additions and 10887 deletions
|
|
@ -21,14 +21,15 @@
|
|||
#include <stdio.h>
|
||||
#include "nutscan-device.h"
|
||||
|
||||
char nutscan_device_type_string[TYPE_END][6] = {
|
||||
char * nutscan_device_type_string[TYPE_END]= {
|
||||
"NONE",
|
||||
"USB",
|
||||
"SNMP",
|
||||
"XML",
|
||||
"NUT",
|
||||
"IPMI",
|
||||
"AVAHI" };
|
||||
"AVAHI",
|
||||
"EATON_SERIAL" };
|
||||
|
||||
void nutscan_display_ups_conf(nutscan_device_t * device)
|
||||
{
|
||||
|
|
@ -51,9 +52,9 @@ void nutscan_display_ups_conf(nutscan_device_t * device)
|
|||
nutdev_num, current_dev->driver,
|
||||
current_dev->port);
|
||||
|
||||
opt = &(current_dev->opt);
|
||||
opt = current_dev->opt;
|
||||
|
||||
do {
|
||||
while (NULL != opt) {
|
||||
if( opt->option != NULL ) {
|
||||
printf("\t%s",opt->option);
|
||||
if( opt->value != NULL ) {
|
||||
|
|
@ -62,7 +63,7 @@ void nutscan_display_ups_conf(nutscan_device_t * device)
|
|||
printf("\n");
|
||||
}
|
||||
opt = opt->next;
|
||||
} while( opt != NULL );
|
||||
}
|
||||
|
||||
nutdev_num++;
|
||||
|
||||
|
|
@ -92,9 +93,9 @@ void nutscan_display_parsable(nutscan_device_t * device)
|
|||
current_dev->driver,
|
||||
current_dev->port);
|
||||
|
||||
opt = &(current_dev->opt);
|
||||
opt = current_dev->opt;
|
||||
|
||||
do {
|
||||
while (NULL != opt) {
|
||||
if( opt->option != NULL ) {
|
||||
printf(",%s",opt->option);
|
||||
if( opt->value != NULL ) {
|
||||
|
|
@ -102,7 +103,8 @@ void nutscan_display_parsable(nutscan_device_t * device)
|
|||
}
|
||||
}
|
||||
opt = opt->next;
|
||||
} while( opt != NULL );
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
current_dev = current_dev->next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue