NAME

nutscan_add_option_to_device - Add option data to the specified device.

SYNOPSIS

Note
Two NUT websites

This version of the page reflects NUT release v2.7.4 with codebase commited 0b4bfddbc at 2016-03-09T14:24:11+01:00

Options, features and capabilities in current development (and future releases) are detailed on the main site and may differ from ones described here.

#include <nut-scan.h>
void nutscan_add_option_to_device(nutscan_device_t * device,char * option_name, char * value);

DESCRIPTION

The nutscan_device_t contains the following variables:

nutscan_device_type_t   type;
char *          driver;
char *          port;
nutscan_options_t       opt;
struct nutscan_device * prev;
struct nutscan_device * next;

This is a double linked list of device. Each device is described by its type, its driver name, its port and any number of optional data.

The nutscan_add_option_to_device() adds an optional data in the given devcie. Optional data are made of an option_name and an associated value. Copies of option_name and value are stored in the device, so the caller can safely free both of them.

SEE ALSO