Hi Reuben,
On Mon, Apr 04, 2011 at 10:58:40AM +1200, Reuben Dowle wrote:
> This patch adds the ubiupdatevol applet (from mtd-utils) to busybox.
> Incorporates changes as suggested by Baruch Siach.
>
> This version of ubiupdatevol makes some assumptions about the naming of ubi
> device nodes, to avoid the complexity of scanning and probing devices nodes
> as libubi does in the full version of ubiupdatevol.
>
> Signed-off-by: Reuben Dowle <reuben.dowle at navico.com>
> ---
[snip]
> + snprintf(buf, sizeof(buf), >
> "/sys/class/ubi/ubi%d_%d/usable_eb_size", ubinum, volnum);
> + sysfs_fd = xopen(buf, O_RDONLY);
> + bb_error_msg_and_die("%s sysfs not accessible", "UBI");
You exit unconditionally here. Is this your intention?
> + if (full_read(sysfs_fd, buf, sizeof(buf)) <= 0)
> + bb_error_msg_and_die("%s could not get LEB
> size", "UBI");
> + if (ENABLE_FEATURE_CLEAN_UP)
> + close(sysfs_fd);
> + if (sscanf(buf, "%d", &leb_size) != 1)
> + bb_error_msg_and_die("%s could not get LEB
> size", "UBI");
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox