On Tue, Jan 24, 2012 at 2:26 PM, Pete Batard <[email protected]> wrote:
> When using the extract.c sample, I'm seeing quite a few on these errors on > pretty much all of the ISO9660 images I try. > > For instance, if you download the latest FreeDOS ISO from [1], you will > get: > > (...) > Extracting: ./tmp/freedos/setup/nls/menu2.**it <http://menu2.it> > Extracting: ./tmp/freedos/setup/nls/menu2.**nl <http://menu2.nl> > ++ WARN: bad size for ISO9660 directory (240d) should be (2048)! > ++ WARN: bad size for ISO9660 directory (504d) should be (2048)! > ++ WARN: bad size for ISO9660 directory (262d) should be (2048)! > ++ WARN: bad size for ISO9660 directory (1982d) should be (2048)! > ++ WARN: bad size for ISO9660 directory (244d) should be (2048)! > (...) > > While I don't doubt that the warning is probably faithful to the 9660 > specs, Just for curiosity, what does the Phillips UDF checker say about this if anything? > I think I'll stand on the side of people and applications that, either > willingly or unwillingly, deviate from the specs. This is because a size > value that can only be a multiple of the block size looks pretty useless to > me, and it makes more sense to try to use one that reflects the actual size > required in actual bytes. > > Also, taking liberties with this size doesn't seem to have any impact for > libcdio. As far as I can tell, it doesn't endanger any of the operations > being done by the code (we alloc a multiple of ISO_BLOCKSIZE regradless), > so at the very least, it shouldn't be flagged with as high a level as > warning. > > Therefore, I simply propose to remove these warnings altogether, as per > the patch attached. I have also pushed this patch to the -pbatard repo > (which I'll revert if someone sees a good reason to keep the messages in). > Sounds okay to me. Of course, I too am interested in the views of others and that's why it's good to ask on this mailing list. > Regards, > > /Pete > > [1] > http://www.freedos.org/**freedos/files/<http://www.freedos.org/freedos/files/> > > From 7573b65c209f8751491ff7dca7d8ca725be4f976 Mon Sep 17 00:00:00 2001 > From: Pete Batard <[email protected]> > Date: Tue, 24 Jan 2012 19:17:10 +0000 > Subject: [PATCH] Remove 'bad size for ISO9660 directory' warnings > > --- > lib/iso9660/iso9660_fs.c | 28 ---------------------------- > 1 files changed, 0 insertions(+), 28 deletions(-) > > diff --git a/lib/iso9660/iso9660_fs.c b/lib/iso9660/iso9660_fs.c > index e918110..f29a5e9 100644 > --- a/lib/iso9660/iso9660_fs.c > +++ b/lib/iso9660/iso9660_fs.c > @@ -982,13 +982,6 @@ _fs_stat_traverse (const CdIo_t *p_cdio, const > iso9660_stat_t *_root, > > cdio_assert (_root->type == _STAT_DIR); > > - if (_root->size != ISO_BLOCKSIZE * _root->secsize) > - { > - cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", > - (unsigned) _root->size, > - (unsigned long int) ISO_BLOCKSIZE * _root->secsize); > - } > - > _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE); > if (!_dirbuf) > { > @@ -1090,13 +1083,6 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const > iso9660_stat_t *_root, > > cdio_assert (_root->type == _STAT_DIR); > > - if (_root->size != ISO_BLOCKSIZE * _root->secsize) > - { > - cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", > - (unsigned) _root->size, > - (unsigned long int) ISO_BLOCKSIZE * _root->secsize); > - } > - > _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE); > if (!_dirbuf) > { > @@ -1304,13 +1290,6 @@ iso9660_fs_readdir (CdIo_t *p_cdio, const char > psz_path[], bool b_mode2) > uint8_t *_dirbuf = NULL; > CdioList_t *retval = _cdio_list_new (); > > - if (p_stat->size != ISO_BLOCKSIZE * p_stat->secsize) > - { > - cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", > - (unsigned) p_stat->size, > - (unsigned long int) ISO_BLOCKSIZE * p_stat->secsize); > - } > - > _dirbuf = calloc(1, p_stat->secsize * ISO_BLOCKSIZE); > if (!_dirbuf) > { > @@ -1375,13 +1354,6 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char > psz_path[]) > uint8_t *_dirbuf = NULL; > CdioList_t *retval = _cdio_list_new (); > > - if (p_stat->size != ISO_BLOCKSIZE * p_stat->secsize) > - { > - cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", > - (unsigned int) p_stat->size, > - (unsigned long int) ISO_BLOCKSIZE * p_stat->secsize); > - } > - > _dirbuf = calloc(1, p_stat->secsize * ISO_BLOCKSIZE); > if (!_dirbuf) > { > -- > 1.7.8.msysgit.0 > > >
