Ticket #12657: FIX-12957.patch

File FIX-12957.patch, 2.3 KB (added by spitaels, 8 years ago)

fix the 64-bit type printf misalignment

  • src/tools/bfs_shell/command_checkfs.cpp

    From 6f7473827b82ee3a8ec756cbd99582873bbac1ae Mon Sep 17 00:00:00 2001
    From: Antoine SPITAELS <spitaelsantoine@gmail.com>
    Date: Fri, 24 Jun 2016 02:33:08 +0200
    Subject: [PATCH] fix the 64-bit type printf misalignment
    
    ---
     src/tools/bfs_shell/command_checkfs.cpp | 10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/src/tools/bfs_shell/command_checkfs.cpp b/src/tools/bfs_shell/command_checkfs.cpp
    index 35a6648..70dfa0e 100644
    a b command_checkfs(int argc, const char* const* argv)  
    5555    while (_kern_ioctl(rootDir, BFS_IOCTL_CHECK_NEXT_NODE, &result,
    5656            sizeof(result)) == B_OK) {
    5757        if (++counter % 50 == 0)
    58             fssh_dprintf("%9Ld nodes processed\x1b[1A\n", counter);
     58            fssh_dprintf("%" B_PRIu64 " nodes processed\x1b[1A\n", counter);
    5959
    6060        if (result.pass == BFS_CHECK_PASS_BITMAP) {
    6161            if (result.errors) {
    62                 fssh_dprintf("%s (inode = %lld)", result.name, result.inode);
     62                fssh_dprintf("%s (inode = %" FSSH_B_PRIi64 ")", result.name, result.inode);
    6363                if ((result.errors & BFS_MISSING_BLOCKS) != 0)
    6464                    fssh_dprintf(", some blocks weren't allocated");
    6565                if ((result.errors & BFS_BLOCKS_ALREADY_SET) != 0)
    command_checkfs(int argc, const char* const* argv)  
    114114        "\tindices\t\t%" B_PRIu64 "\n", files, directories, attributes,
    115115        attributeDirectories, indices);
    116116
    117     fssh_dprintf("\n\tdirect block runs\t\t%" B_PRIu64 " (%lld)\n",
     117    fssh_dprintf("\n\tdirect block runs\t\t%" B_PRIu64 " (%" B_PRIu64 ")\n",
    118118        result.stats.direct_block_runs,
    119119        result.stats.blocks_in_direct * result.stats.block_size);
    120120    fssh_dprintf("\tindirect block runs\t\t%" B_PRIu64 " (in %" B_PRIu64
    121         " array blocks, %lld)\n", result.stats.indirect_block_runs,
     121        " array blocks, %" B_PRIu64 ")\n", result.stats.indirect_block_runs,
    122122        result.stats.indirect_array_blocks,
    123123        result.stats.blocks_in_indirect * result.stats.block_size);
    124124    fssh_dprintf("\tdouble indirect block runs\t%" B_PRIu64 " (in %" B_PRIu64
    125         " array blocks, %lld)\n", result.stats.double_indirect_block_runs,
     125        " array blocks, %" B_PRIu64 ")\n", result.stats.double_indirect_block_runs,
    126126        result.stats.double_indirect_array_blocks,
    127127        result.stats.blocks_in_double_indirect * result.stats.block_size);
    128128