On 2014-05-21 08:02, Catalin Salgau wrote:
I would suggest adding a message informing the user that his file will
be truncated to 512 byte sectors.
For example I tested with a file 167 bytes long and received 'Offset 0
too large for file size', which is quite confusing.
In my staging branch, I updated the error message to explicitly mention
the exported size in sectors, with a special case for sub-sector file
sizes.
https://github.com/ecashin/vblade/commit/f44958553eb535931692964793af8c8b070e5a8c
https://github.com/ecashin/vblade/commit/4fbf65b1010f855bf04ef1951f867928d178321f
--
Ed Cashin <ed.cashin@xxxxxxx>
diff --git a/aoe.c b/aoe.c
index d2ea03a..168f923 100644
--- a/aoe.c
+++ b/aoe.c
@@ -519,8 +519,13 @@ main(int argc, char **argv)
size = getsize(bfd);
size /= 512;
if (size <= offset) {
- fprintf(stderr,
- "Offset %llu too large for file size\n", offset);
+ if (offset)
+ fprintf(stderr,
+ "Offset %lld too large for %lld-sector export\n",
+ offset,
+ size);
+ else
+ fputs("0-sector file size is too small\n", stderr);
exit(1);
}
size -= offset;
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Aoetools-discuss mailing list
Aoetools-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/aoetools-discuss