[PATCH] mtd: mkfs.ubifs: Improve error handling of is_contained()

Marcus Prebble marcus.prebble at axis.com
Tue Oct 16 07:51:01 EDT 2012


mtd: mtd-utils/mkfs.ubifs: Improve error handling of is_contained()

The is_contained() function returns -1 if an error occurs when
canonicalizing the output file path/root directory. This resulted in the
confusing error message 'Error: The output file cannot be in the UBIFS
root' when specifying a non-existent directory for the output.
This patch changes the error handling to display a different error
message for the case when is_contained() returns -1.
Additionally it frees all memory allocated by is_contained().

Signed-off-by: Marcus Prebble <marcus.prebble at axis.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mkfs.ubifs-is-contained-err-handling.patch
Type: text/x-patch
Size: 2115 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20121016/3891c13f/attachment.bin>


More information about the linux-mtd mailing list