aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-06-18 16:35:23 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-06-18 16:35:23 +0300
commit47812a77cf2d0eaab9daf066ef86c5b4fc0f9347 (patch)
treeacaf10dbd4849a74e8480475c4507f6be3b892aa /ubi-utils/src
parent80cecea79cf13075d136e73067aa40439539bb0f (diff)
UBI: fix tests
This patch fixes UBI tests and adds udev problems solution description. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src')
-rw-r--r--ubi-utils/src/libubi.c7
1 files changed, 5 insertions, 2 deletions
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;
}