X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fexfat-utils.git;a=blobdiff_plain;f=libexfat%2Fnode.c;fp=libexfat%2Fnode.c;h=ab1d7d6d04c7d36831c34c20dda7b0c5a4fade6e;hp=1ccb1c9eda0d41ddb70f64496563cd9f5e3a1472;hb=276900f1c02916b78f58fa21b736aa80ffd04bf5;hpb=23065231e2de34b851503c9cb92465fa6333f1c0 diff --git a/libexfat/node.c b/libexfat/node.c index 1ccb1c9..ab1d7d6 100644 --- a/libexfat/node.c +++ b/libexfat/node.c @@ -223,7 +223,8 @@ static bool check_node(const struct exfat* ef, struct exfat_node* node, exfat_get_name(node, buffer); exfat_error("'%s' has invalid checksum (%#hx != %#hx)", buffer, le16_to_cpu(actual_checksum), le16_to_cpu(meta1->checksum)); - ret = false; + if (!EXFAT_REPAIR(invalid_node_checksum, ef, node)) + ret = false; } /* @@ -516,7 +517,8 @@ static int readdir(struct exfat* ef, struct exfat_node* parent, break; /* deleted entry, ignore it */ exfat_error("unknown entry type %#hhx", entry.type); - return -EIO; + if (!EXFAT_REPAIR(unknown_entry, ef, parent, &entry, *offset)) + return -EIO; } *offset += sizeof(entry); }