2 * Copyright 2017, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
11 #include <driver_settings.h>
13 static const char *sTabs
= "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
15 int usage(const char *progname
)
20 void print_params(int indent
, const driver_parameter
*p
)
22 printf("indent: %d\n", indent
);
23 printf("%.*s'%s': [", indent
, sTabs
, p
->name
);
24 for (int i
= 0; i
< p
->value_count
; i
++) {
25 printf(" '%s',", p
->values
[i
]);
29 for (int i
= 0; i
< p
->parameter_count
; i
++)
30 print_params(indent
, &p
->parameters
[i
]);
33 int main(int argc
, char **argv
)
36 const driver_settings
*s
;
37 h
= load_driver_settings(argv
[1]);
39 return usage(argv
[0]);
41 s
= get_driver_settings(h
);
43 printf("%d\n", s
->parameter_count
);
44 for (int i
= 0; i
< s
->parameter_count
; i
++) {
45 print_params(0, &s
->parameters
[i
]);
48 unload_driver_settings(h
);