Source
140
140
{
141
141
fprintf(stderr, "Usage: lsgpio [options]...\n"
142
142
"List GPIO chips, lines and states\n"
143
143
" -n <name> List GPIOs on a named device\n"
144
144
" -? This helptext\n"
145
145
);
146
146
}
147
147
148
148
int main(int argc, char **argv)
149
149
{
150
-
const char *device_name;
150
+
const char *device_name = NULL;
151
151
int ret;
152
152
int c;
153
153
154
154
while ((c = getopt(argc, argv, "n:")) != -1) {
155
155
switch (c) {
156
156
case 'n':
157
157
device_name = optarg;
158
158
break;
159
159
case '?':
160
160
print_usage();