From 47812a77cf2d0eaab9daf066ef86c5b4fc0f9347 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 18 Jun 2007 16:35:23 +0300 Subject: UBI: fix tests This patch fixes UBI tests and adds udev problems solution description. Signed-off-by: Artem Bityutskiy --- ubi-utils/src/libubi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ubi-utils/src/libubi.c') diff --git a/ubi-utils/src/libubi.c b/ubi-utils/src/libubi.c index 17ab4ee..06cf52a 100644 --- a/ubi-utils/src/libubi.c +++ b/ubi-utils/src/libubi.c @@ -272,10 +272,14 @@ int ubi_mkvol(libubi_t desc, const char *node, struct ubi_mkvol_request *req) return -1; ret = ioctl(fd, UBI_IOCMKVOL, &r); - if (!ret) req->vol_id = r.vol_id; +#if 1 + /* This is a hack to work around udev problems */ + system("udevsettle"); +#endif + close(fd); return ret; } @@ -455,7 +459,6 @@ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id, return -1; info->name[ret - 1] = '\0'; - return 0; } -- cgit v1.2.3