iso9660_fs.c: remove some (but not all) of the redundancy

testisocd2.c.in: a test of working with an ISO 9660 image.
This commit is contained in:
rocky
2007-08-12 12:41:10 +00:00
parent 2a01d008fc
commit a33bb59a7f
6 changed files with 220 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: testisocd.c,v 1.4 2007/08/11 16:26:14 rocky Exp $
/* $Id: testisocd.c,v 1.5 2007/08/12 12:41:10 rocky Exp $
Copyright (C) 2003, 2004, 2005, 2006, 2007 Rocky Bernstein
<rocky@gnu.org>
@@ -108,7 +108,13 @@ main(int argc, const char *argv[])
iso9660_fs_find_lsn_with_path (p_cdio, i_lsn, &psz_path);
/* Compare the two statbufs. */
#if 0
if (0 != memcmp(p_statbuf, p_statbuf2, sizeof(iso9660_stat_t))) {
#else
if (p_statbuf->lsn != p_statbuf2->lsn ||
p_statbuf->size != p_statbuf2->size ||
p_statbuf->type != p_statbuf2->type) {
#endif
fprintf(stderr, "File stat information between fs_stat and "
"fs_find_lsn isn't the same\n");
exit(3);
@@ -125,6 +131,7 @@ main(int argc, const char *argv[])
fprintf(stderr, "Path returned for fs_find_lsn_with_path "
"is not correct should be /./, is %s\n", psz_path);
exit(5);
free(psz_path);
}
} else {
fprintf(stderr, "Path returned for fs_find_lsn_with_path is NULL\n");