Changeset 5a6cc679 in mainline for uspace/app/untar


Ignore:
Timestamp:
2018-01-31T02:21:24Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

Location:
uspace/app/untar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/untar/main.c

    r132ab5d1 r5a6cc679  
    4444}
    4545
    46 static int skip_blocks(FILE *tarfile, size_t valid_data_size)
     46static errno_t skip_blocks(FILE *tarfile, size_t valid_data_size)
    4747{
    4848        size_t blocks_to_read = get_block_count(valid_data_size);
     
    5858}
    5959
    60 static int handle_normal_file(const tar_header_t *header, FILE *tarfile)
     60static errno_t handle_normal_file(const tar_header_t *header, FILE *tarfile)
    6161{
    6262        // FIXME: create the directory first
     
    6969        }
    7070
    71         int rc = EOK;
     71        errno_t rc = EOK;
    7272        size_t bytes_remaining = header->size;
    7373        size_t blocks = get_block_count(bytes_remaining);
     
    101101}
    102102
    103 static int handle_directory(const tar_header_t *header, FILE *tarfile)
     103static errno_t handle_directory(const tar_header_t *header, FILE *tarfile)
    104104{
    105         int rc;
     105        errno_t rc;
    106106
    107107        rc = vfs_link_path(header->filename, KIND_DIRECTORY, NULL);
     
    140140                        break;
    141141                }
    142                 int rc = tar_header_parse(&header, &header_raw);
     142                errno_t rc = tar_header_parse(&header, &header_raw);
    143143                if (rc == EEMPTY) {
    144144                        continue;
  • uspace/app/untar/tar.c

    r132ab5d1 r5a6cc679  
    6767}
    6868
    69 int tar_header_parse(tar_header_t *parsed, const tar_header_raw_t *raw)
     69errno_t tar_header_parse(tar_header_t *parsed, const tar_header_raw_t *raw)
    7070{
    71         int rc;
     71        errno_t rc;
    7272
    7373        if (str_length(raw->filename) == 0) {
  • uspace/app/untar/tar.h

    r132ab5d1 r5a6cc679  
    7070
    7171
    72 extern int tar_header_parse(tar_header_t *, const tar_header_raw_t *);
     72extern errno_t tar_header_parse(tar_header_t *, const tar_header_raw_t *);
    7373extern tar_type_t tar_type_parse(const char);
    7474extern const char *tar_type_str(tar_type_t);
Note: See TracChangeset for help on using the changeset viewer.