]> www.infradead.org Git - mtd-utils.git/commit
mkfs.ubifs: Improve error handling of is_contained()
authorMarcus Prebble <marcus.prebble@axis.com>
Tue, 16 Oct 2012 11:51:01 +0000 (13:51 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 26 Oct 2012 13:55:57 +0000 (16:55 +0300)
commit334221cf5a94ec3a75c7620661eb5b7b5332256c
tree51bf303c959d04e4de539017a41f2e6eb2142675
parent17f66065837415e0b1b4d619f12a2219af987c80
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@axis.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
mkfs.ubifs/mkfs.ubifs.c