- data.ioc_version = OBD_IOCTL_VERSION;
- data.ioc_len = sizeof(data);
- if (offset >= 0)
- data.ioc_inlbuf1 = base + offset + 2;
- else
- data.ioc_inlbuf1 = base;
- data.ioc_inllen1 = strlen(data.ioc_inlbuf1) + 1;
-
- if (obd_ioctl_pack(&data, &buf, max)) {
- printf("ioctl_pack failed.\n");
- exit(1);
- }
-
- rc = ioctl(fd, IOC_MDC_LOOKUP, buf);
- if (rc < 0) {
- printf("ioctl(%s/%s) error: %s\n", parent,
- data.ioc_inlbuf1, strerror(errno));
- exit(errno);
- }
+ rc = llapi_file_lookup(fd, name);
+ if (rc < 0) {
+ printf("llapi_file_lookup (%s/%s) error: %s\n", parent,
+ name, strerror(errno));
+ exit(errno);
+ }