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

Commit a481cc28 authored by Harry Cutts's avatar Harry Cutts Committed by Android (Google) Code Review
Browse files

Merge "uinput: report errors from configuration ioctls" into main

parents 6a9ba2e0 2bec9191
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -283,7 +283,10 @@ static void configure(JNIEnv* env, jclass /* clazz */, jint handle, jint code,
    std::vector<int32_t> configs = toVector(env, rawConfigs);
    // Configure uinput device, with user specified code and value.
    for (auto& config : configs) {
        ::ioctl(static_cast<int>(handle), _IOW(UINPUT_IOCTL_BASE, code, int), config);
        if (::ioctl(static_cast<int>(handle), _IOW(UINPUT_IOCTL_BASE, code, int), config) < 0) {
            ALOGE("Error configuring device (ioctl %d, value 0x%x): %s", code, config,
                  strerror(errno));
        }
    }
}