Skip to content

mtp-probe must use libusb_wrap_sys_device #331

@benzea

Description

@benzea

Currently, libusb may discover devices for which udev has not yet finished. This causes race conditions, as device permissions are not yet set up correctly. See libusb/libusb#1625.

Right now, fixing this breaks mtp-probe, because it cannot find the device it is looking for. This can be fixed (possible with some slight refactoring). mtp-probe receives all the information through environment variables and could also get e.g. the path passed explicitly as a parameter. So one can open the device file and then use libusb_wrap_sys_device.

We might do a workaround in libusb to permit discovering the device that the udev rule is running for. However, that is not nice and libmtp should be fixed to do the right thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions