Changeset 2988aec7 in mainline for uspace/app/bithenge/print.c


Ignore:
Timestamp:
2012-08-14T03:17:17Z (13 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
71b0d4d4
Parents:
1b6b76d
Message:

Bithenge: read FAT files/subdirs; self-recursion and more operators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/print.c

    r1b6b76d r2988aec7  
    181181        bithenge_blob_t *blob = bithenge_node_as_blob(node);
    182182        aoff64_t pos = 0;
    183         char buffer[1024];
     183        uint8_t buffer[1024];
    184184        aoff64_t size = sizeof(buffer);
    185185        int rc;
     
    187187            state->type == BITHENGE_PRINT_PYTHON ? "b\"" : "\"");
    188188        do {
    189                 rc = bithenge_blob_read(blob, pos, buffer, &size);
     189                rc = bithenge_blob_read(blob, pos, (char *)buffer, &size);
    190190                if (rc != EOK)
    191191                        return rc;
    192192                for (aoff64_t i = 0; i < size; i++)
    193193                        state_printf(state, "\\x%02x",
    194                             (unsigned int)(uint8_t)buffer[i]);
     194                            (unsigned int)buffer[i]);
    195195                pos += size;
    196196        } while (size == sizeof(buffer));
Note: See TracChangeset for help on using the changeset viewer.