diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f4f5ba..ad6be5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.8..3.22) -project(minitar LANGUAGES C VERSION 1.1.0) +project(minitar LANGUAGES C VERSION 1.2.0) set(SOURCES src/tar.c diff --git a/README.md b/README.md index 81acebe..12ee9a0 100644 --- a/README.md +++ b/README.md @@ -119,13 +119,9 @@ This enum lists all supported file types: `MTAR_REGULAR`: Regular files -`MTAR_BLKDEV`: Block special devices - -`MTAR_CHRDEV`: Character special devices - `MTAR_DIRECTORY`: Directories -Other file types supported in tar archives, such as FIFOs or symlinks, are not supported and minitar will throw an error when encountering one of them. +Other file types supported in tar archives, such as block/character devices, FIFOs, or symlinks, are not supported and minitar will throw an error when encountering one of them. ### minitar_entry_metadata `struct minitar_entry_metadata` diff --git a/minitar.h b/minitar.h index 1fa47c5..66c40bf 100644 --- a/minitar.h +++ b/minitar.h @@ -15,8 +15,6 @@ struct minitar; enum minitar_file_type { MTAR_REGULAR, - MTAR_CHRDEV, - MTAR_BLKDEV, MTAR_DIRECTORY }; diff --git a/src/util.c b/src/util.c index 397d8a0..4c396a6 100644 --- a/src/util.c +++ b/src/util.c @@ -126,8 +126,8 @@ void minitar_parse_metadata_from_tar_header(const struct tar_header* hdr, struct case '0': metadata->type = MTAR_REGULAR; break; case '1': minitar_panic("Links to other files within a tar archive are unsupported"); case '2': minitar_panic("Symbolic links are unsupported"); - case '3': metadata->type = MTAR_CHRDEV; break; - case '4': metadata->type = MTAR_BLKDEV; break; + case '3': minitar_panic("Character devices are unsupported"); + case '4': minitar_panic("Block devices are unsupported"); case '5': metadata->type = MTAR_DIRECTORY; break; case '6': minitar_panic("FIFOs are unsupported"); default: minitar_panic("Unknown entry type in tar header");