From eded3e909d8d7122ea1652940bb41bf5eef3ed55 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 17 Dec 2007 13:29:40 +0200 Subject: 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 --- ubi-utils/src/libubi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ubi-utils/src/libubi.c') 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; } -- cgit v1.2.3