diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-06 11:54:56 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-06 11:56:02 +0100 |
commit | 4d46b361ff1371a6f3f4f89ed8ca81ee23e86de8 (patch) | |
tree | 0705d7c216ea345665cd38345bc21f8931195849 /tar | |
parent | 3afffc2a59cfc3888a84b2b2305b5312393ff4e8 (diff) |
Remove raw file descriptors from tar read path
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r-- | tar/tar2sqfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c index 30f1abb..4634364 100644 --- a/tar/tar2sqfs.c +++ b/tar/tar2sqfs.c @@ -251,7 +251,7 @@ static int write_file(tar_header_decoded_t *hdr, file_info_t *fi, if (ret) return -1; - return skip_padding(STDIN_FILENO, hdr->sparse == NULL ? + return skip_padding(stdin, hdr->sparse == NULL ? filesize : hdr->record_size); } @@ -337,7 +337,7 @@ static int process_tar_ball(void) int ret; for (;;) { - ret = read_header(STDIN_FILENO, &hdr); + ret = read_header(stdin, &hdr); if (ret > 0) break; if (ret < 0) @@ -395,7 +395,7 @@ static int process_tar_ball(void) if (skip) { if (dont_skip) goto fail; - if (skip_entry(STDIN_FILENO, hdr.sb.st_size)) + if (skip_entry(stdin, hdr.sb.st_size)) goto fail; clear_header(&hdr); |