Author: bonefish Date: 2009-11-25 13:02:20 +0100 (Wed, 25 Nov 2009) New Revision: 34241 Changeset: http://dev.haiku-os.org/changeset/34241/haiku Modified: haiku/trunk/headers/build/os/support/SupportDefs.h haiku/trunk/headers/os/support/SupportDefs.h haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h haiku/trunk/headers/private/fs_shell/fssh_types.h haiku/trunk/src/add-ons/kernel/file_systems/bfs/Debug.cpp haiku/trunk/src/bin/addattr/main.cpp haiku/trunk/src/bin/copyattr.cpp haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp haiku/trunk/src/bin/xres.cpp haiku/trunk/src/tools/fs_shell/Jamfile haiku/trunk/src/tools/fs_shell/block_cache.cpp haiku/trunk/src/tools/fs_shell/fd.cpp haiku/trunk/src/tools/fs_shell/file_cache.cpp haiku/trunk/src/tools/fs_shell/file_map.cpp haiku/trunk/src/tools/fs_shell/fssh.cpp haiku/trunk/src/tools/fs_shell/vfs.cpp Log: * Added B_PRIdTIME and B_PRIiTIME macros (for time_t). * Added FSSH_[S]SIZE_MAX to headers/private/fs_shell/fssh_types.h. * Fixed various 64 bit compiler warnings. Nothing too serious, though. Modified: haiku/trunk/headers/build/os/support/SupportDefs.h =================================================================== --- haiku/trunk/headers/build/os/support/SupportDefs.h 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/headers/build/os/support/SupportDefs.h 2009-11-25 12:02:20 UTC (rev 34241) @@ -136,6 +136,9 @@ /* ino_t */ #define B_PRIdINO B_PRId64 #define B_PRIiINO B_PRIi64 +/* time_t */ +#define B_PRIdTIME B_PRId32 +#define B_PRIiTIME B_PRIi32 /* Empty string ("") */ Modified: haiku/trunk/headers/os/support/SupportDefs.h =================================================================== --- haiku/trunk/headers/os/support/SupportDefs.h 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/headers/os/support/SupportDefs.h 2009-11-25 12:02:20 UTC (rev 34241) @@ -126,6 +126,9 @@ /* ino_t */ #define B_PRIdINO B_PRId64 #define B_PRIiINO B_PRIi64 +/* time_t */ +#define B_PRIdTIME B_PRId32 +#define B_PRIiTIME B_PRIi32 /* Empty string ("") */ Modified: haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h =================================================================== --- haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/headers/private/fs_shell/fssh_api_wrapper.h 2009-11-25 12:02:20 UTC (rev 34241) @@ -1503,8 +1503,6 @@ #define gid_t fssh_gid_t #define pid_t fssh_pid_t -#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) - /* printf()/scanf() format strings for [u]int* types */ #define B_PRId8 FSSH_B_PRId8 #define B_PRIi8 FSSH_B_PRIi8 @@ -1575,10 +1573,11 @@ /* ino_t */ #define B_PRIdINO FSSH_B_PRIdINO #define B_PRIiINO FSSH_B_PRIiINO +/* time_t */ +#define B_PRIdTIME FSSH_B_PRId32 +#define B_PRIiTIME FSSH_B_PRIi32 -#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */ - //////////////////////////////////////////////////////////////////////////////// // #pragma mark - fssh_uio.h Modified: haiku/trunk/headers/private/fs_shell/fssh_types.h =================================================================== --- haiku/trunk/headers/private/fs_shell/fssh_types.h 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/headers/private/fs_shell/fssh_types.h 2009-11-25 12:02:20 UTC (rev 34241) @@ -123,6 +123,14 @@ /* ino_t */ #define FSSH_B_PRIdINO FSSH_B_PRId64 #define FSSH_B_PRIiINO FSSH_B_PRIi64 +/* time_t */ +#define FSSH_B_PRIdTIME FSSH_B_PRId32 +#define FSSH_B_PRIiTIME FSSH_B_PRIi32 +/* limits */ +#define FSSH_SIZE_MAX UINT32_MAX +#define FSSH_SSIZE_MAX INT32_MAX + + #endif // _FSSH_TYPES_H Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/Debug.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/file_systems/bfs/Debug.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/Debug.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -119,13 +119,13 @@ kprintf(" gid = %u\n", (unsigned)inode->GroupID()); kprintf(" mode = %08x\n", (int)inode->Mode()); kprintf(" flags = %08x\n", (int)inode->Flags()); - kprintf(" create_time = %" B_PRIx64 " (%ld.%u)\n", + kprintf(" create_time = %" B_PRIx64 " (%" B_PRIdTIME ".%u)\n", inode->CreateTime(), bfs_inode::ToSecs(inode->CreateTime()), (unsigned)bfs_inode::ToUsecs(inode->CreateTime())); - kprintf(" last_modified_time = %" B_PRIx64 " (%ld.%u)\n", + kprintf(" last_modified_time = %" B_PRIx64 " (%" B_PRIdTIME ".%u)\n", inode->LastModifiedTime(), bfs_inode::ToSecs(inode->LastModifiedTime()), (unsigned)bfs_inode::ToUsecs(inode->LastModifiedTime())); - kprintf(" status_change_time = %" B_PRIx64 " (%ld.%u)\n", + kprintf(" status_change_time = %" B_PRIx64 " (%" B_PRIdTIME ".%u)\n", inode->StatusChangeTime(), bfs_inode::ToSecs(inode->StatusChangeTime()), (unsigned)bfs_inode::ToUsecs(inode->StatusChangeTime())); dump_block_run( " parent = ", inode->parent); Modified: haiku/trunk/src/bin/addattr/main.cpp =================================================================== --- haiku/trunk/src/bin/addattr/main.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/bin/addattr/main.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -70,7 +70,7 @@ // type didn't show up - in this case, we parse the string // as number and use it directly as type code - if (sscanf(string, "%lu", _result) == 1) + if (sscanf(string, "%" B_SCNu32, _result) == 1) return B_OK; uchar type[4]; @@ -173,8 +173,8 @@ return 1; } if (size > 4 * 1024 * 1024) { - fprintf(stderr, "%s: attribute value is too large: %Ld bytes\n", - gProgramName, size); + fprintf(stderr, "%s: attribute value is too large: %" B_PRIdOFF + " bytes\n", gProgramName, size); return 1; } Modified: haiku/trunk/src/bin/copyattr.cpp =================================================================== --- haiku/trunk/src/bin/copyattr.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/bin/copyattr.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -222,7 +222,7 @@ // created as well do { size_t toRead = kCopyBufferSize; - if (toRead > bytesLeft) + if ((off_t)toRead > bytesLeft) toRead = bytesLeft; // read Modified: haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp =================================================================== --- haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -237,8 +237,8 @@ continue; } - fprintf(stderr, "offset: %16lld, size: %16lld, type: %x%s\n", - (int64)partition->Offset(), (int64)partition->Size(), + fprintf(stderr, "offset: %16" B_PRIdOFF ", size: %16" B_PRIdOFF + ", type: %x%s\n", partition->Offset(), partition->Size(), partition->Type(), partition->IsExtended() ? " (extended)" : ""); } } @@ -658,8 +658,8 @@ = B_HOST_TO_LENDIAN_INT32((uint32)(partitionOffset / 512)); // write the boot code - printf("Writing boot code to \"%s\" (partition offset: %lld bytes, " - "start offset = %lld) " + printf("Writing boot code to \"%s\" (partition offset: %" B_PRId64 + " bytes, start offset = %" B_PRIdOFF ") " "...\n", fileName, partitionOffset, startOffset); write_boot_code_part(fileName, fd, startOffset, bootCodeData, 0, Modified: haiku/trunk/src/bin/xres.cpp =================================================================== --- haiku/trunk/src/bin/xres.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/bin/xres.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -1,5 +1,5 @@ /* - * Copyright 2005, Ingo Weinhold, bonefish@xxxxxxxxxxxxx + * Copyright 2005-2009, Ingo Weinhold, bonefish@xxxxxxxxxxxxx * Distributed under the terms of the MIT License. */ @@ -364,8 +364,8 @@ size_t size; for (int32 i = 0; resources.GetResourceInfo(i, &type, &id, &name, &size); i++) { - printf("'%s' %11ld %11lu %s\n", resource_type(type), id, size, - (name && strlen(name) > 0 ? name : "(no name)")); + printf("'%s' %11" B_PRId32 " %11lu %s\n", resource_type(type), id, + size, (name && strlen(name) > 0 ? name : "(no name)")); } } }; @@ -479,9 +479,9 @@ status_t error = fResources->AddResource(id.type, id.id, data, size, name); if (error != B_OK) { - fprintf(stderr, "Error: Failed to add resource type '%s', ID %ld " - "to output file \"%s\": %s\n", resource_type(id.type), id.id, - fOutputFilePath.c_str(), strerror(error)); + fprintf(stderr, "Error: Failed to add resource type '%s', ID %" + B_PRId32 " to output file \"%s\": %s\n", resource_type(id.type), + id.id, fOutputFilePath.c_str(), strerror(error)); exit(1); } } Modified: haiku/trunk/src/tools/fs_shell/Jamfile =================================================================== --- haiku/trunk/src/tools/fs_shell/Jamfile 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/tools/fs_shell/Jamfile 2009-11-25 12:02:20 UTC (rev 34241) @@ -65,18 +65,20 @@ vfs.cpp ; +BuildPlatformMergeObject <build>fs_shell_kernel.o : $(kernelEmulationSources) ; + BuildPlatformStaticLibrary <build>fuse_module.a : - $(kernelEmulationSources) $(externalCommandsSources) fuse.cpp + : <build>fs_shell_kernel.o ; BuildPlatformStaticLibrary <build>fs_shell.a : - $(kernelEmulationSources) $(externalCommandsSources) fssh.cpp + : <build>fs_shell_kernel.o ; SEARCH on [ FGristFiles rootfs.cpp ] Modified: haiku/trunk/src/tools/fs_shell/block_cache.cpp =================================================================== --- haiku/trunk/src/tools/fs_shell/block_cache.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/tools/fs_shell/block_cache.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -319,8 +319,8 @@ while (iterator.HasNext()) { cache_listener* listener = iterator.Next(); - bool remove = isClosing && !is_written_event(listener->events) - || isWritten && is_written_event(listener->events); + bool remove = (isClosing && !is_written_event(listener->events)) + || (isWritten && is_written_event(listener->events)); if (remove) iterator.Remove(); @@ -536,8 +536,9 @@ Free(block->current_data); if (block->original_data != NULL || block->parent_data != NULL) { - fssh_panic("block_cache::FreeBlock(): %Ld, original %p, parent %p\n", - block->block_number, block->original_data, block->parent_data); + fssh_panic("block_cache::FreeBlock(): %" FSSH_B_PRIdOFF + ", original %p, parent %p\n", block->block_number, + block->original_data, block->parent_data); } #ifdef DEBUG_CHANGED @@ -560,7 +561,7 @@ // if we hit the limit of blocks to cache¸ try to free one or more if (allocated_block_count >= kMaxBlockCount) { - RemoveUnusedBlocks(LONG_MAX, + RemoveUnusedBlocks(INT32_MAX, allocated_block_count - kMaxBlockCount + 1); } @@ -685,7 +686,7 @@ } if (cache->allocated_block_count > kMaxBlockCount) { - cache->RemoveUnusedBlocks(LONG_MAX, + cache->RemoveUnusedBlocks(INT32_MAX, cache->allocated_block_count - kMaxBlockCount); } } @@ -695,8 +696,8 @@ put_cached_block(block_cache* cache, fssh_off_t blockNumber) { if (blockNumber < 0 || blockNumber >= cache->max_blocks) { - fssh_panic("put_cached_block: invalid block number %lld (max %lld)", - blockNumber, cache->max_blocks - 1); + fssh_panic("put_cached_block: invalid block number %" FSSH_B_PRIdOFF + " (max %" FSSH_B_PRIdOFF ")", blockNumber, cache->max_blocks - 1); } cached_block* block = (cached_block*)hash_lookup(cache->hash, &blockNumber); @@ -719,8 +720,8 @@ bool readBlock = true) { if (blockNumber < 0 || blockNumber >= cache->max_blocks) { - fssh_panic("get_cached_block: invalid block number %lld (max %lld)", - blockNumber, cache->max_blocks - 1); + fssh_panic("get_cached_block: invalid block number %" FSSH_B_PRIdOFF + " (max %" FSSH_B_PRIdOFF ")", blockNumber, cache->max_blocks - 1); return NULL; } @@ -744,7 +745,7 @@ if (fssh_read_pos(cache->fd, blockNumber * blockSize, block->current_data, blockSize) < blockSize) { cache->RemoveBlock(block); - FATAL(("could not read block %Ld\n", blockNumber)); + FATAL(("could not read block %" FSSH_B_PRIdOFF "\n", blockNumber)); return NULL; } } @@ -777,8 +778,9 @@ blockNumber, transactionID)); if (blockNumber < 0 || blockNumber >= cache->max_blocks) { - fssh_panic("get_writable_cached_block: invalid block number %lld (max %lld)", - blockNumber, cache->max_blocks - 1); + fssh_panic("get_writable_cached_block: invalid block number %" + FSSH_B_PRIdOFF " (max %" FSSH_B_PRIdOFF ")", blockNumber, + cache->max_blocks - 1); } bool allocated; @@ -894,8 +896,8 @@ data, blockSize); if (written < blockSize) { - FATAL(("could not write back block %Ld (%s)\n", block->block_number, - fssh_strerror(fssh_get_errno()))); + FATAL(("could not write back block %" FSSH_B_PRIdOFF " (%s)\n", + block->block_number, fssh_strerror(fssh_get_errno()))); return FSSH_B_IO_ERROR; } @@ -1548,8 +1550,8 @@ // transaction or no transaction only if (blockNumber < 0 || blockNumber >= cache->max_blocks) { - fssh_panic("block_cache_sync_etc: invalid block number %Ld (max %Ld)", - blockNumber, cache->max_blocks - 1); + fssh_panic("block_cache_sync_etc: invalid block number %" FSSH_B_PRIdOFF + " (max %" FSSH_B_PRIdOFF ")", blockNumber, cache->max_blocks - 1); return FSSH_B_BAD_VALUE; } @@ -1595,8 +1597,8 @@ } else { if (block->transaction != NULL && block->parent_data != NULL && block->parent_data != block->current_data) { - fssh_panic("Discarded block %Ld has already been changed in " - "this transaction!", blockNumber); + fssh_panic("Discarded block %" FSSH_B_PRIdOFF " has already " + "been changed in this transaction!", blockNumber); } // mark it as discarded (in the current transaction only, if any) Modified: haiku/trunk/src/tools/fs_shell/fd.cpp =================================================================== --- haiku/trunk/src/tools/fs_shell/fd.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/tools/fs_shell/fd.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -361,13 +361,13 @@ { // struct file_descriptor *descriptor; // fssh_status_t status; -// +// // TRACE(("select_fd(fd = %d, event = %u, ref = %lu, selectsync = %p)\n", fd, event, ref, sync)); -// +// // descriptor = get_fd(get_current_io_context(kernel), fd); // if (descriptor == NULL) // return FSSH_B_FILE_ERROR; -// +// // if (descriptor->ops->fd_select) { // status = descriptor->ops->fd_select(descriptor, event, ref, sync); // } else { @@ -375,7 +375,7 @@ // // immediately notify the select call // status = notify_select_event((void *)sync, ref, event); // } -// +// // put_fd(descriptor); // return status; @@ -388,18 +388,18 @@ { // struct file_descriptor *descriptor; // fssh_status_t status; -// +// // TRACE(("deselect_fd(fd = %d, event = %u, selectsync = %p)\n", fd, event, sync)); -// +// // descriptor = get_fd(get_current_io_context(kernel), fd); // if (descriptor == NULL) // return FSSH_B_FILE_ERROR; -// +// // if (descriptor->ops->fd_deselect) // status = descriptor->ops->fd_deselect(descriptor, event, sync); // else // status = FSSH_B_OK; -// +// // put_fd(descriptor); // return status; @@ -485,8 +485,8 @@ if (descriptor->ops->fd_read) { bytesRead = descriptor->ops->fd_read(descriptor, pos, buffer, &length); if (bytesRead >= FSSH_B_OK) { - if (length > SSIZE_MAX) - bytesRead = SSIZE_MAX; + if (length > FSSH_SSIZE_MAX) + bytesRead = FSSH_SSIZE_MAX; else bytesRead = (fssh_ssize_t)length; @@ -528,8 +528,8 @@ break; } - if ((uint32_t)bytesRead + length > SSIZE_MAX) - bytesRead = SSIZE_MAX; + if ((uint32_t)bytesRead + length > FSSH_SSIZE_MAX) + bytesRead = FSSH_SSIZE_MAX; else bytesRead += (fssh_ssize_t)length; @@ -564,8 +564,8 @@ if (descriptor->ops->fd_write) { bytesWritten = descriptor->ops->fd_write(descriptor, pos, buffer, &length); if (bytesWritten >= FSSH_B_OK) { - if (length > SSIZE_MAX) - bytesWritten = SSIZE_MAX; + if (length > FSSH_SSIZE_MAX) + bytesWritten = FSSH_SSIZE_MAX; else bytesWritten = (fssh_ssize_t)length; @@ -607,8 +607,8 @@ break; } - if ((uint32_t)bytesWritten + length > SSIZE_MAX) - bytesWritten = SSIZE_MAX; + if ((uint32_t)bytesWritten + length > FSSH_SSIZE_MAX) + bytesWritten = FSSH_SSIZE_MAX; else bytesWritten += (fssh_ssize_t)length; Modified: haiku/trunk/src/tools/fs_shell/file_cache.cpp =================================================================== --- haiku/trunk/src/tools/fs_shell/file_cache.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/tools/fs_shell/file_cache.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -249,15 +249,16 @@ // get vnode fssh_status_t error = vfs_lookup_vnode(mountID, vnodeID, &ref->node); if (error != FSSH_B_OK) { - fssh_dprintf("file_cache_create(): Failed get vnode %d:%lld: %s\n", - mountID, vnodeID, fssh_strerror(error)); + fssh_dprintf("file_cache_create(): Failed get vnode %d:%" FSSH_B_PRIdINO + ": %s\n", mountID, vnodeID, fssh_strerror(error)); delete ref; return NULL; } // create lock char buffer[32]; - fssh_snprintf(buffer, sizeof(buffer), "file cache %d:%lld", (int)mountID, vnodeID); + fssh_snprintf(buffer, sizeof(buffer), "file cache %d:%" FSSH_B_PRIdINO, + (int)mountID, vnodeID); fssh_mutex_init(&ref->lock, buffer); return ref; Modified: haiku/trunk/src/tools/fs_shell/file_map.cpp =================================================================== --- haiku/trunk/src/tools/fs_shell/file_map.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/tools/fs_shell/file_map.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -318,7 +318,8 @@ while (status == FSSH_B_OK && mapEnd < end) { // We don't have the requested extents yet, retrieve them fssh_size_t vecCount = kMaxVecs; - status = vfs_get_file_map(Vnode(), mapEnd, ~0UL, vecs, &vecCount); + status = vfs_get_file_map(Vnode(), mapEnd, FSSH_SIZE_MAX, vecs, + &vecCount); if (status == FSSH_B_OK || status == FSSH_B_BUFFER_OVERFLOW) status = _Add(vecs, vecCount, mapEnd); } @@ -336,8 +337,8 @@ MutexLocker _(fLock); - if (mode == FSSH_FILE_MAP_CACHE_ALL && fCacheAll - || mode == FSSH_FILE_MAP_CACHE_ON_DEMAND && !fCacheAll) + if ((mode == FSSH_FILE_MAP_CACHE_ALL && fCacheAll) + || (mode == FSSH_FILE_MAP_CACHE_ON_DEMAND && !fCacheAll)) return FSSH_B_OK; if (mode == FSSH_FILE_MAP_CACHE_ALL) { Modified: haiku/trunk/src/tools/fs_shell/fssh.cpp =================================================================== --- haiku/trunk/src/tools/fs_shell/fssh.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/tools/fs_shell/fssh.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -300,7 +300,7 @@ static char string[64]; if (blocks < 1024) - sprintf(string, "%Ld", numBlocks * blockSize); + sprintf(string, "%" FSSH_B_PRId64, numBlocks * blockSize); else { const char* units[] = {"K", "M", "G", NULL}; int i = -1; @@ -406,7 +406,8 @@ nameSuffix += buffer; } - printf("%c%s %2d %2d %10lld %d-%02d-%02d %02d:%02d:%02d %s%s\n", + printf("%c%s %2d %2d %10" FSSH_B_PRIdOFF + " %d-%02d-%02d %02d:%02d:%02d %s%s\n", fileType, permissions.c_str(), (int)st.fssh_st_uid, (int)st.fssh_st_gid, st.fssh_st_size, 1900 + time.tm_year, 1 + time.tm_mon, time.tm_mday, @@ -706,7 +707,7 @@ if (status != FSSH_B_OK) return status; - printf("root inode: %lld\n", info.root); + printf("root inode: %" FSSH_B_PRIdINO "\n", info.root); printf("flags: "); print_flag(info.flags, FSSH_B_FS_HAS_QUERY, "Q", "-"); print_flag(info.flags, FSSH_B_FS_HAS_ATTR, "A", "-"); @@ -716,14 +717,14 @@ print_flag(info.flags, FSSH_B_FS_IS_REMOVABLE, "R", "-"); print_flag(info.flags, FSSH_B_FS_IS_READONLY, "-", "W"); - printf("\nblock size: %lld\n", info.block_size); - printf("I/O size: %lld\n", info.io_size); - printf("total size: %s (%lld blocks)\n", + printf("\nblock size: %" FSSH_B_PRIdOFF "\n", info.block_size); + printf("I/O size: %" FSSH_B_PRIdOFF "\n", info.io_size); + printf("total size: %s (%" FSSH_B_PRIdOFF " blocks)\n", byte_string(info.total_blocks, info.block_size), info.total_blocks); - printf("free size: %s (%lld blocks)\n", + printf("free size: %s (%" FSSH_B_PRIdOFF " blocks)\n", byte_string(info.free_blocks, info.block_size), info.free_blocks); - printf("total nodes: %lld\n", info.total_nodes); - printf("free nodes: %lld\n", info.free_nodes); + printf("total nodes: %" FSSH_B_PRIdOFF "\n", info.total_nodes); + printf("free nodes: %" FSSH_B_PRIdOFF "\n", info.free_nodes); printf("volume name: %s\n", info.volume_name); printf("fs name: %s\n", info.fsh_name); @@ -1089,8 +1090,8 @@ if (error == FSSH_B_OK) { printf(" %s\n", path); } else { - fprintf(stderr, " failed to resolve entry (%8lld, \"%s\")\n", - entry->d_pino, entry->d_name); + fprintf(stderr, " failed to resolve entry (%8" FSSH_B_PRIdINO + ", \"%s\")\n", entry->d_pino, entry->d_name); } } Modified: haiku/trunk/src/tools/fs_shell/vfs.cpp =================================================================== --- haiku/trunk/src/tools/fs_shell/vfs.cpp 2009-11-25 11:58:09 UTC (rev 34240) +++ haiku/trunk/src/tools/fs_shell/vfs.cpp 2009-11-25 12:02:20 UTC (rev 34241) @@ -793,7 +793,8 @@ fssh_mutex_unlock(&sVnodeMutex); if (--tries < 0) { // vnode doesn't seem to become unbusy - fssh_panic("vnode %d:%lld is not becoming unbusy!\n", (int)mountID, vnodeID); + fssh_panic("vnode %d:%" FSSH_B_PRIdINO " is not becoming unbusy!\n", + (int)mountID, vnodeID); return FSSH_B_BUSY; } fssh_snooze(10000); // 10 ms @@ -1080,8 +1081,8 @@ fssh_mutex_unlock(&sVnodeMutex); if (*_vnode == NULL) { - fssh_panic("lookup_dir_entry(): could not lookup vnode (mountid 0x%x vnid " - "0x%Lx)\n", (int)dir->device, id); + fssh_panic("lookup_dir_entry(): could not lookup vnode (mountid %d " + "vnid %" FSSH_B_PRIdINO ")\n", (int)dir->device, id); return FSSH_B_ENTRY_NOT_FOUND; } @@ -1906,8 +1907,9 @@ struct vnode *vnode = lookup_vnode(volume->id, vnodeID); if (vnode != NULL) { - fssh_panic("vnode %d:%Ld already exists (node = %p, vnode->node = %p)!", - (int)volume->id, vnodeID, privateNode, vnode->private_node); + fssh_panic("vnode %d:%" FSSH_B_PRIdINO " already exists (node = %p, " + "vnode->node = %p)!", (int)volume->id, vnodeID, privateNode, + vnode->private_node); } fssh_status_t status = create_new_vnode(&vnode, volume->id, vnodeID); @@ -4868,7 +4870,8 @@ // but this vnode won't go away since we keep a reference to it. previousVnode = vnode; } else { - fssh_dprintf("syncing of mount %d stopped due to vnode %lld.\n", (int)mount->id, id); + fssh_dprintf("syncing of mount %d stopped due to vnode %" + FSSH_B_PRIdINO ".\n", (int)mount->id, id); break; } }