Add support for reading Level 3 images.
This commit is contained in:
parent
3f6da75e9c
commit
87f08d27ac
@ -39,7 +39,7 @@ print_type(mode_t mode)
|
|||||||
case S_IFREG: printf("[R] "); break;
|
case S_IFREG: printf("[R] "); break;
|
||||||
case S_IFBLK: printf("[B] "); break;
|
case S_IFBLK: printf("[B] "); break;
|
||||||
case S_IFDIR: printf("[D] "); break;
|
case S_IFDIR: printf("[D] "); break;
|
||||||
case S_IFIFO: printf("[F] "); break;
|
case S_IFIFO: printf("[F] "); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,6 +51,7 @@ print_file_src(IsoFileSource *file)
|
|||||||
iso_file_source_lstat(file, &info);
|
iso_file_source_lstat(file, &info);
|
||||||
print_type(info.st_mode);
|
print_type(info.st_mode);
|
||||||
print_permissions(info.st_mode);
|
print_permissions(info.st_mode);
|
||||||
|
printf(" %10llu ", info.st_size);
|
||||||
//printf(" {%ld,%ld} ", (long)info.st_dev, (long)info.st_ino);
|
//printf(" {%ld,%ld} ", (long)info.st_dev, (long)info.st_ino);
|
||||||
name = iso_file_source_get_name(file);
|
name = iso_file_source_get_name(file);
|
||||||
printf(" %s", name);
|
printf(" %s", name);
|
||||||
@ -116,7 +117,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
iso_init();
|
iso_init();
|
||||||
iso_set_msgs_severities("NEVER", "ALL", "");
|
iso_set_msgs_severities("NEVER", "ALL", "");
|
||||||
|
|
||||||
result = iso_data_source_new_from_file(argv[1], &src);
|
result = iso_data_source_new_from_file(argv[1], &src);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
printf ("Error creating data source\n");
|
printf ("Error creating data source\n");
|
||||||
@ -134,10 +135,10 @@ int main(int argc, char **argv)
|
|||||||
printf ("Error creating filesystem\n");
|
printf ("Error creating filesystem\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\nVOLUME INFORMATION\n");
|
printf("\nVOLUME INFORMATION\n");
|
||||||
printf("==================\n\n");
|
printf("==================\n\n");
|
||||||
|
|
||||||
printf("Vol. id: %s\n", iso_image_fs_get_volume_id(fs));
|
printf("Vol. id: %s\n", iso_image_fs_get_volume_id(fs));
|
||||||
printf("Publisher: %s\n", iso_image_fs_get_publisher_id(fs));
|
printf("Publisher: %s\n", iso_image_fs_get_publisher_id(fs));
|
||||||
printf("Data preparer: %s\n", iso_image_fs_get_data_preparer_id(fs));
|
printf("Data preparer: %s\n", iso_image_fs_get_data_preparer_id(fs));
|
||||||
@ -149,7 +150,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
printf("\nDIRECTORY TREE\n");
|
printf("\nDIRECTORY TREE\n");
|
||||||
printf("==============\n");
|
printf("==============\n");
|
||||||
|
|
||||||
result = fs->get_root(fs, &root);
|
result = fs->get_root(fs, &root);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
printf ("Can't get root %d\n", result);
|
printf ("Can't get root %d\n", result);
|
||||||
@ -158,7 +159,7 @@ int main(int argc, char **argv)
|
|||||||
//print_file_src(root);
|
//print_file_src(root);
|
||||||
print_dir(root, 0);
|
print_dir(root, 0);
|
||||||
iso_file_source_unref(root);
|
iso_file_source_unref(root);
|
||||||
|
|
||||||
fs->close(fs);
|
fs->close(fs);
|
||||||
iso_filesystem_unref((IsoFilesystem*)fs);
|
iso_filesystem_unref((IsoFilesystem*)fs);
|
||||||
iso_data_source_unref(src);
|
iso_data_source_unref(src);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -107,6 +107,17 @@ enum IsoNodeType {
|
|||||||
|
|
||||||
#define ISO_NODE(n) ((IsoNode*)n)
|
#define ISO_NODE(n) ((IsoNode*)n)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File section in an old image.
|
||||||
|
*
|
||||||
|
* @since 0.6.8
|
||||||
|
*/
|
||||||
|
struct iso_file_section
|
||||||
|
{
|
||||||
|
uint32_t block;
|
||||||
|
uint32_t size;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context for iterate on directory children.
|
* Context for iterate on directory children.
|
||||||
* @see iso_dir_get_children()
|
* @see iso_dir_get_children()
|
||||||
|
Loading…
Reference in New Issue
Block a user