Add this to check if device was created via guse and allow it.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
* perfectly normal when resolving paths), errno is not cleared.
*/
errno = 0;
-
- if (strcmp(sysfsp, "/sys/bus/gpio") != 0) {
- /* This is a character device but not the one we're after. */
- errno = ENODEV;
- goto out_free_sysfsp;
- }
-
+ if (strcmp(sysfsp, "/sys/class/guse") == 0)
+ goto out_ok;
+ else if (strcmp(sysfsp, "/sys/bus/gpio") == 0)
+ goto out_ok;
+
+ errno = ENODEV;
+ goto out_free_sysfsp;
+out_ok:
ret = true;
out_free_sysfsp: