Ticket #845: amd64.diff

File amd64.diff, 4.3 KB (added by korli, 13 years ago)

amd64 patch (doesn't work for intel 32 bits)

  • src/tools/fs_shell/vfs.cpp

     
    32233223    // We need to set the locking atomically - someone
    32243224    // else might set one at the same time
    32253225    if (fssh_atomic_test_and_set((vint32_t *)&vnode->mandatory_locked_by,
    3226             0, (fssh_addr_t)descriptor) != (int32_t)descriptor)
     3226            0, (fssh_addr_t)descriptor) != (uint64_t)descriptor)
    32273227        status = FSSH_B_BAD_VALUE;
    32283228
    32293229    put_fd(descriptor);
  • src/tools/fs_shell/block_cache.cpp

     
    951951    if (_unchangedData)
    952952        *_unchangedData = block->original_data;
    953953
    954     *_cookie = (uint32_t)block;
     954    *_cookie = (uint64_t)block;
    955955    return FSSH_B_OK;   
    956956}
    957957
  • src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp

     
    19081908            nextOffset = node->OverflowLink();
    19091909        else {
    19101910            if (node->AllKeyLength() > fTree->fNodeSize
    1911                 || (uint32)node->Values() > (uint32)node + fTree->fNodeSize
     1911                || (uint64)node->Values() > (uint64)node + fTree->fNodeSize
    19121912                    - 8 * node->NumKeys())
    19131913                RETURN_ERROR(B_ERROR);
    19141914
  • src/add-ons/kernel/file_systems/bfs/Journal.cpp

     
    7777add_to_iovec(iovec *vecs, int32 &index, int32 max, const void *address, size_t size)
    7878{
    7979    if (index > 0
    80         && (addr_t)vecs[index - 1].iov_base + vecs[index - 1].iov_len == (addr_t)address) {
     80        && (uint64)vecs[index - 1].iov_base + vecs[index - 1].iov_len == (uint64)address) {
    8181        // the iovec can be combined with the previous one
    8282        vecs[index - 1].iov_len += size;
    8383        return;
  • src/add-ons/kernel/file_systems/bfs/bfs.h

     
    365365    // we need to check the location first, because if name_size is already beyond
    366366    // the block, we would touch invalid memory (although that can't cause wrong
    367367    // results)
    368     return (uint32)this > (uint32)inode + inode->InodeSize() - sizeof(small_data) || name_size == 0;
     368    return (uint64)this > (uint64)inode + inode->InodeSize() - sizeof(small_data) || name_size == 0;
    369369}
    370370
    371371#ifdef _BOOT_MODE
  • src/add-ons/kernel/file_systems/bfs/Debug.cpp

     
    206206        buffer[length] = '\0';
    207207
    208208        off_t *value = node->Values() + i;
    209         if ((uint32)value < (uint32)node || (uint32)value > (uint32)node + header->node_size)
     209        if ((uint64)value < (uint64)node || (uint64)value > (uint64)node + header->node_size)
    210210            Print("  %2d. Invalid Offset!!\n", (int)i);
    211211        else {
    212212            Print("  %2d. ", (int)i);
  • headers/private/fs_shell/fssh_errors.h

     
    1010
    1111
    1212/* Error baselines */
    13 #define FSSH_B_GENERAL_ERROR_BASE       LONG_MIN
     13#define FSSH_B_GENERAL_ERROR_BASE       INT_MIN
    1414#define FSSH_B_OS_ERROR_BASE            FSSH_B_GENERAL_ERROR_BASE + 0x1000
    1515#define FSSH_B_APP_ERROR_BASE           FSSH_B_GENERAL_ERROR_BASE + 0x2000
    1616#define FSSH_B_INTERFACE_ERROR_BASE     FSSH_B_GENERAL_ERROR_BASE + 0x3000
  • headers/private/fs_shell/fssh_types.h

     
    66typedef uint32_t            fssh_ulong;
    77typedef volatile int32_t    vint32_t;
    88
    9 typedef uint32_t    fssh_addr_t;
     9typedef uint64_t    fssh_addr_t;
    1010
    1111typedef int32_t     fssh_dev_t;
    1212typedef int64_t     fssh_ino_t;