Home | History | Annotate | Download | only in toolbox

Lines Matching refs:device

121 static int open_device(const char *device, int print_flags)
132 fd = open(device, O_RDWR);
135 fprintf(stderr, "could not open %s, %s\n", device, strerror(errno));
141 fprintf(stderr, "could not get driver version for %s, %s\n", device, strerror(errno));
146 fprintf(stderr, "could not get driver id for %s, %s\n", device, strerror(errno));
153 //fprintf(stderr, "could not get device name for %s, %s\n", device, strerror(errno));
157 //fprintf(stderr, "could not get location for %s, %s\n", device, strerror(errno));
161 //fprintf(stderr, "could not get idstring for %s, %s\n", device, strerror(errno));
179 printf("add device %d: %s\n", nfds, device);
201 device_names[nfds] = strdup(device);
207 int close_device(const char *device, int print_flags)
211 if(strcmp(device_names[i], device) == 0) {
214 printf("remove device %d: %s\n", i, device);
223 fprintf(stderr, "remote device: %s not found\n", device);
295 fprintf(stderr, "Usage: %s [-t] [-n] [-s switchmask] [-S] [-v [mask]] [-p] [-q] [-c count] [-r] [device]\n", argv[0]);
325 const char *device = NULL;
386 device = argv[optind];
397 if(device) {
400 res = open_device(device, print_flags);