libfstools: support file paths longer than 255 chars
[project/fstools.git] / libubi / libubi.c
index 3494f9d..3328ac8 100644 (file)
@@ -22,6 +22,7 @@
 
 #define PROGRAM_NAME "libubi"
 
+#include <sys/sysmacros.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -861,7 +862,7 @@ int ubi_remove_dev(libubi_t desc, const char *node, int ubi_dev)
                sys_errmsg("cannot open \"%s\"", node);
                return -1;
        }
-       ret = ioctl(fd, UBI_IOCDET, &ubi_dev);
+       ret = ioctl(fd, UBI_IOCFDET, &ubi_dev);
        if (ret == -1)
                goto out_close;