Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 241046ad authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "fastboot: Remove '\n' from interface name on linux" into main

parents c72c9a6d 28f4807d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -269,6 +269,9 @@ static int filter_usb_device(char* sysfs_name,
        auto path = android::base::StringPrintf("/sys/bus/usb/devices/%s/%s:1.%d/interface",
                                                sysfs_name, sysfs_name, ifc->bInterfaceNumber);
        if (android::base::ReadFileToString(path, &interface)) {
            if (!interface.empty() && interface.back() == '\n') {
                interface.pop_back();
            }
            snprintf(info.interface, sizeof(info.interface), "%s", interface.c_str());
        }