summaryrefslogtreecommitdiff
path: root/ubi-utils/src
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-17 13:29:40 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-17 13:29:40 +0200
commiteded3e909d8d7122ea1652940bb41bf5eef3ed55 (patch)
tree4e9a7af70397cf0bf8efebccdcd891937bda740b /ubi-utils/src
parentfd98ff924d71061a062b813cb784f83e4c89401f (diff)
ubi-utils: add udevsettle hack
Add udevsettle call to libubi which is not compiled in by default. We need this for UBI testing. Also, add one more TODO note Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src')
-rw-r--r--ubi-utils/src/libubi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ubi-utils/src/libubi.c b/ubi-utils/src/libubi.c
index a028fc6..4d2b725 100644
--- a/ubi-utils/src/libubi.c
+++ b/ubi-utils/src/libubi.c
@@ -276,6 +276,12 @@ int ubi_mkvol(libubi_t desc, const char *node, struct ubi_mkvol_request *req)
req->vol_id = r.vol_id;
close(fd);
+
+#ifdef UDEV_SETTLE_HACK
+ if (system("udevsettle") == -1)
+ return -1;
+#endif
+
return ret;
}
@@ -290,6 +296,12 @@ int ubi_rmvol(libubi_t desc, const char *node, int vol_id)
ret = ioctl(fd, UBI_IOCRMVOL, &vol_id);
close(fd);
+
+#ifdef UDEV_SETTLE_HACK
+ if (system("udevsettle") == -1)
+ return -1;
+#endif
+
return ret;
}