Rename internal function minitar_parse_tar_header -> minitar_parse_metadata_from_tar_header

This commit is contained in:
apio 2022-11-22 17:28:15 +01:00
parent 0fbcdde399
commit ba7b77bdae
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
// all of these are defined in util.c // all of these are defined in util.c
int minitar_read_header(struct minitar*, struct tar_header*); int minitar_read_header(struct minitar*, struct tar_header*);
int minitar_validate_header(const struct tar_header*); int minitar_validate_header(const struct tar_header*);
void minitar_parse_tar_header(const struct tar_header*, struct minitar_entry_metadata*); void minitar_parse_metadata_from_tar_header(const struct tar_header*, struct minitar_entry_metadata*);
struct minitar_entry* minitar_dup_entry(const struct minitar_entry*); struct minitar_entry* minitar_dup_entry(const struct minitar_entry*);
char* minitar_read_file_contents(struct minitar_entry_metadata*, struct minitar*); char* minitar_read_file_contents(struct minitar_entry_metadata*, struct minitar*);
size_t minitar_get_size_in_blocks(size_t); size_t minitar_get_size_in_blocks(size_t);
@ -50,7 +50,7 @@ static struct minitar_entry* minitar_attempt_read_entry(struct minitar* mp, int*
*valid = 0; *valid = 0;
if (fgetpos(mp->stream, &entry.position)) return NULL; if (fgetpos(mp->stream, &entry.position)) return NULL;
*valid = 1; *valid = 1;
minitar_parse_tar_header(&hdr, &entry.metadata); minitar_parse_metadata_from_tar_header(&hdr, &entry.metadata);
if (entry.metadata.size) if (entry.metadata.size)
{ {
size_t size_in_blocks = minitar_get_size_in_blocks(entry.metadata.size); size_t size_in_blocks = minitar_get_size_in_blocks(entry.metadata.size);

View File

@ -54,7 +54,7 @@ size_t minitar_get_size_in_blocks(size_t size)
return minitar_is_block_aligned(size) ? size : minitar_align_down_to_block(size) + 512; return minitar_is_block_aligned(size) ? size : minitar_align_down_to_block(size) + 512;
} }
void minitar_parse_tar_header(const struct tar_header* hdr, struct minitar_entry_metadata* metadata) void minitar_parse_metadata_from_tar_header(const struct tar_header* hdr, struct minitar_entry_metadata* metadata)
{ {
if (!strlen(hdr->prefix)) if (!strlen(hdr->prefix))
{ {