Displaying 2 results from an estimated 2 matches for "extendvart".
2006 Jun 03
1
RFC: allow HID subdriver's to register ups.conf settings
...s is all legal
code.
--
SYNOPSIS:
Allow a newhidups subdriver to register that it can handle settings in
ups.conf (and via -x on the command line), as per the normal serial drivers.
DESCRIPTION OF CHANGES:
- In newhidups.h, add an extra line to the subdriver_s struct;
void (*extendvartable)(void);
so it becomes;
struct subdriver_s {
char *name;
int (*claim)(HIDDevice *hd);
usage_tables_t *utab;
hid_info_t *hid2nut;
int (*shutdown)(int ondelay, int offdelay);
char *(*format_...
2006 Jun 04
2
RFC: allow HID subdriver's to register ups.conf
...ea (see one of my
> previous messages) I can't call subdriver->function() from makevartable as
> subdriver hasn't been given a sensible value at that point, instead, I'm
> having to do:
>
> for (i=0; subdriver_list[i] != NULL; i++) {
> subdriver_list[i]->extendvartable();
> }
>
> So I assume that I should modify this to be:
>
> for (i=0; subdriver_list[i] != NULL; i++) {
> if (subdriver[i]->init != NULL) {
> subdriver_list[i]->init();
> }
> }
This is a bad idea. It would mean that the variables of *all* the
subdri...