Hi Mike,

> +                /* XXX: This doesn't handle symlinks/odd paths/etc... */
> +                const char *desc = description + 2;
> +                size_t len = strlen(bus->dirname);
> +                if (strncmp(desc, bus->dirname, len))
> +                    continue;
> +                desc += len;
> +                if (desc[0] != '/')
> +                    continue;
> +                ++desc;
> +                if (strcmp(desc, dev->filename))
> +                    continue;
> +                return ftdi_usb_open_dev(ftdi, dev);

that is indeed more elegant than using the buffer/snprintf approach.

Thanks for the patch.

Kind regards,

Gerd

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]   

Reply via email to