From 425ac1b60a56f4df7a0e88bd784545c0ec4fa01f Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Tue, 20 Jun 2023 17:57:22 -0500 Subject: [PATCH] refactor: Swap %Ld for %lld in all format usages * %Ld is an undocumented alias for %lld in glibc. * muslc doesn't implement it for this reason. * While we will likely never drop %Ld support, lets clean house and set a better example. Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636 Reviewed-by: Adrien Destugues Reviewed-by: Alex von Gluck IV Tested-by: Commit checker robot --- .../kernel/bus_managers/random/driver.cpp | 4 +- .../kernel/bus_managers/scsi/queuing.cpp | 4 +- .../kernel/drivers/audio/ac97/ich/ich.c | 14 +++---- .../drivers/audio/ac97/ichaudio/ichaudio.c | 8 ++-- src/add-ons/kernel/drivers/audio/cmedia/pcm.c | 4 +- .../kernel/drivers/disk/norflash/norflash.cpp | 4 +- .../drivers/disk/scsi/scsi_cd/scsi_cd.cpp | 2 +- .../kernel/drivers/dvb/cx23882/cx23882.c | 4 +- .../kernel/drivers/input/wacom/wacom.c | 2 +- .../kernel/drivers/network/tun/driver.c | 4 +- .../kernel/drivers/ports/pc_serial/Driver.cpp | 4 +- .../drivers/ports/usb_serial/Driver.cpp | 4 +- .../kernel/file_cache/launch_speedup.cpp | 10 ++--- src/add-ons/kernel/file_cache/log.cpp | 12 +++--- .../file_cache/rule_based_prefetcher.cpp | 10 ++--- .../file_systems/bfs/BlockAllocator.cpp | 2 +- src/add-ons/kernel/file_systems/bfs/Inode.cpp | 8 ++-- .../file_systems/bfs/kernel_interface.cpp | 6 +-- .../file_systems/cdda/kernel_interface.cpp | 2 +- .../kernel/file_systems/iso9660/iso9660.cpp | 6 +-- .../file_systems/iso9660/kernel_interface.cpp | 12 +++--- .../file_systems/ramfs/DataContainer.cpp | 8 ++-- .../kernel/file_systems/ramfs/Index.cpp | 2 +- .../file_systems/ramfs/kernel_interface.cpp | 20 ++++----- .../file_systems/reiserfs/Iterators.cpp | 12 +++--- .../file_systems/udf/kernel_interface.cpp | 18 ++++---- .../userlandfs/kernel_add_on/Volume.cpp | 4 +- .../userlandfs/server/beos/fs_cache.c | 20 ++++----- .../partitioning_systems/amiga/amiga_rdb.cpp | 2 +- .../partitioning_systems/apple/apple.cpp | 2 +- .../partitioning_systems/atari/atari.cpp | 2 +- .../intel/PartitionMapParser.cpp | 2 +- .../media/media-add-ons/dvb/DVBCard.cpp | 2 +- .../media/media-add-ons/dvb/DVBMediaNode.cpp | 42 +++++++++---------- .../dvb/TransportStreamDemux.cpp | 20 ++++----- .../media-add-ons/esound_sink/ESDEndpoint.cpp | 2 +- .../media-add-ons/esound_sink/ESDSinkNode.cpp | 8 ++-- .../FinePixProducer/Producer.cpp | 2 +- .../firewire_dv/FireWireDVNode.cpp | 8 ++-- .../media/media-add-ons/mixer/AudioMixer.cpp | 20 ++++----- .../media/media-add-ons/mixer/MixerCore.cpp | 24 +++++------ .../media/media-add-ons/mixer/MixerInput.cpp | 2 +- .../media/media-add-ons/mixer/MixerInput.h | 4 +- .../multi_audio/MultiAudioNode.cpp | 6 +-- .../opensound/OpenSoundDeviceEngine.cpp | 6 +-- .../media-add-ons/opensound/OpenSoundNode.cpp | 4 +- .../media-add-ons/usb_vision/Producer.cpp | 2 +- .../usb_webcam/CamStreamingDeframer.cpp | 2 +- .../media-add-ons/usb_webcam/Producer.cpp | 2 +- .../media-add-ons/videowindow/VideoNode.cpp | 2 +- .../media/plugins/ape_reader/APEReader.cpp | 8 ++-- .../media/plugins/au_reader/au_reader.cpp | 18 ++++---- .../media/plugins/ffmpeg/AVCodecDecoder.cpp | 4 +- .../plugins/raw_decoder/RawDecoderPlugin.cpp | 2 +- src/add-ons/translators/gif/GIFTranslator.cpp | 2 +- src/apps/cortex/NodeManager/NodeGroup.cpp | 12 +++--- src/apps/cortex/NodeManager/NodeRef.cpp | 14 +++---- src/apps/cortex/RouteApp/DormantNodeIO.cpp | 2 +- .../cortex/ValControl/NumericValControl.cpp | 16 +++---- .../ValControl/ValControlDigitSegment.cpp | 6 +-- .../cortex/addons/common/AudioFilterNode.cpp | 4 +- src/apps/diskprobe/DataEditor.cpp | 8 ++-- src/apps/diskprobe/ProbeView.cpp | 8 ++-- src/apps/diskprobe/TypeEditors.cpp | 2 +- src/apps/icon-o-matic/generic/support/Debug.h | 6 +-- .../media_node_framework/NodeManager.cpp | 4 +- .../audio/AudioAdapter.cpp | 2 +- .../audio/AudioChannelConverter.cpp | 2 +- .../audio/AudioFormatConverter.cpp | 2 +- .../audio/AudioResampler.cpp | 2 +- .../video/VideoProducer.cpp | 12 +++--- src/apps/packageinstaller/PackageInfo.cpp | 2 +- src/apps/processcontroller/ThreadBarMenu.cpp | 2 +- src/apps/soundrecorder/TrackSlider.cpp | 6 +-- src/apps/tv/VideoNode.cpp | 2 +- src/bin/badblocks.cpp | 12 +++--- src/bin/bfs_tools/bfswhich.cpp | 2 +- src/bin/bfs_tools/chkindex.cpp | 6 +-- src/bin/bfs_tools/lib/Bitmap.cpp | 8 ++-- src/bin/bfs_tools/lib/Inode.cpp | 18 ++++---- src/bin/bfs_tools/recover.cpp | 2 +- src/bin/mail_utils/spamdbm.cpp | 2 +- src/build/libbe/app/Message.cpp | 4 +- src/kits/app/Message.cpp | 4 +- src/kits/media/BufferConsumer.cpp | 2 +- src/kits/media/MediaRoster.cpp | 2 +- src/kits/media/SoundPlayNode.cpp | 4 +- src/kits/tracker/TaskLoop.cpp | 6 +-- src/kits/tracker/Tests.cpp | 4 +- src/kits/tracker/Utilities.h | 2 +- src/kits/tracker/WidgetAttributeText.cpp | 2 +- src/system/boot/arch/x86/arch_cpu.cpp | 4 +- .../boot/loader/file_systems/bfs/Stream.cpp | 10 ++--- .../boot/loader/file_systems/fat/File.cpp | 2 +- .../boot/loader/file_systems/fat/Stream.cpp | 6 +-- .../boot/platform/atari_m68k/devices.cpp | 30 ++++++------- .../boot/platform/bios_ia32/devices.cpp | 16 +++---- .../platform/u-boot/arch/ppc/arch_cpu.cpp | 2 +- src/system/kernel/arch/arm/arch_debug.cpp | 2 +- src/system/kernel/arch/x86/arch_debug.cpp | 2 +- src/system/kernel/cache/file_cache.cpp | 20 ++++----- src/system/kernel/cache/file_map.cpp | 6 +-- src/system/kernel/device_manager/devfs.cpp | 8 ++-- src/system/kernel/fs/node_monitor.cpp | 12 +++--- src/system/kernel/fs/rootfs.cpp | 2 +- src/system/kernel/module.cpp | 2 +- src/system/kernel/real_time_clock.cpp | 4 +- src/system/kernel/vm/VMCache.cpp | 2 +- src/system/libroot/os/parsedate.cpp | 2 +- src/system/libroot/posix/pwd_query.c | 2 +- .../kernel/drivers/audio/multi_audio_test.cpp | 2 +- .../kernel/file_systems/bfs/array/array.cpp | 2 +- .../kernel/file_systems/bfs/btree/test.cpp | 8 ++-- .../file_systems/bfs/dump_log/dump_log.cpp | 10 ++--- .../consistency_check/consistency_check.cpp | 2 +- .../file_systems/random_read/random_read.cpp | 10 ++--- .../kernel/kernelland_emu/device_manager.cpp | 2 +- .../add-ons/media/plugins/musepack/main.cpp | 14 +++---- src/tests/kits/media/mp3_reader_test/main.cpp | 14 +++---- src/tests/kits/media/wav_reader_test/main.cpp | 14 +++---- src/tests/kits/storage/BasicTest.cpp | 2 +- src/tests/kits/storage/MimeTypeTest.cpp | 2 +- .../kits/storage/testapps/NodeMonitorTest.cpp | 2 +- .../storage/virtualdrive/mkvirtualdrive.cpp | 2 +- src/tests/servers/app/idle_test/test.cpp | 2 +- src/tests/system/boot/loader/Handle.cpp | 2 +- .../system/kernel/advisory_locking_test.cpp | 4 +- .../system/kernel/cache/block_cache_test.cpp | 14 +++---- .../system/kernel/cache/pages_io_test.cpp | 26 ++++++------ .../device_manager/dma_resource_test.cpp | 2 +- src/tests/system/kernel/scheduler/main.cpp | 2 +- .../system/libroot/posix/dirent_test.cpp | 8 ++-- src/tools/fs_shell/block_cache.cpp | 16 +++---- src/tools/fs_shell/fd.cpp | 2 +- src/tools/fs_shell/file_cache.cpp | 10 ++--- src/tools/fs_shell/vfs.cpp | 18 ++++---- src/tools/restest/ResourceFile.cpp | 6 +-- 137 files changed, 468 insertions(+), 468 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/random/driver.cpp b/src/add-ons/kernel/bus_managers/random/driver.cpp index 602cbce585..d85dc012a1 100644 --- a/src/add-ons/kernel/bus_managers/random/driver.cpp +++ b/src/add-ons/kernel/bus_managers/random/driver.cpp @@ -79,7 +79,7 @@ random_open(void *deviceCookie, const char *name, int flags, void **cookie) static status_t random_read(void *cookie, off_t position, void *_buffer, size_t *_numBytes) { - TRACE("read(%Ld,, %ld)\n", position, *_numBytes); + TRACE("read(%lld,, %ld)\n", position, *_numBytes); MutexLocker locker(&sRandomLock); return RANDOM_READ(sRandomCookie, _buffer, _numBytes); @@ -89,7 +89,7 @@ random_read(void *cookie, off_t position, void *_buffer, size_t *_numBytes) static status_t random_write(void *cookie, off_t position, const void *buffer, size_t *_numBytes) { - TRACE("write(%Ld,, %ld)\n", position, *_numBytes); + TRACE("write(%lld,, %ld)\n", position, *_numBytes); MutexLocker locker(&sRandomLock); return RANDOM_WRITE(sRandomCookie, buffer, _numBytes); } diff --git a/src/add-ons/kernel/bus_managers/scsi/queuing.cpp b/src/add-ons/kernel/bus_managers/scsi/queuing.cpp index 832fcf7720..aa2aac5db3 100644 --- a/src/add-ons/kernel/bus_managers/scsi/queuing.cpp +++ b/src/add-ons/kernel/bus_managers/scsi/queuing.cpp @@ -181,11 +181,11 @@ void scsi_add_queued_request( scsi_ccb *request ) /* { scsi_ccb *tmp = device->queued_reqs; - dprintf( "pos=%Ld, to_insert=%Ld; ", device->last_sort, + dprintf( "pos=%lld, to_insert=%lld; ", device->last_sort, request->sort ); do { - dprintf( "%Ld, %s", tmp->sort, tmp->next == device->queued_reqs ? "\n" : "" ); + dprintf( "%lld, %s", tmp->sort, tmp->next == device->queued_reqs ? "\n" : "" ); tmp = tmp->next; } while( tmp != device->queued_reqs ); }*/ diff --git a/src/add-ons/kernel/drivers/audio/ac97/ich/ich.c b/src/add-ons/kernel/drivers/audio/ac97/ich/ich.c index ff2805cec5..ea1cefea2e 100644 --- a/src/add-ons/kernel/drivers/audio/ac97/ich/ich.c +++ b/src/add-ons/kernel/drivers/audio/ac97/ich/ich.c @@ -541,7 +541,7 @@ init_driver(void) put_module(B_PCI_MODULE_NAME); return B_ERROR; } - LOG(("reset finished after %Ld, ICH_REG_GLOB_CNT = 0x%08x\n", system_time() - start, val)); + LOG(("reset finished after %lld, ICH_REG_GLOB_CNT = 0x%08x\n", system_time() - start, val)); /* detect which codecs are ready */ s0cr = s1cr = s2cr = false; @@ -550,15 +550,15 @@ init_driver(void) val = ich_reg_read_32(ICH_REG_GLOB_STA); if (!s0cr && (val & STA_S0CR)) { s0cr = true; - LOG(("AC_SDIN0 codec ready after %Ld us\n",(system_time() - start))); + LOG(("AC_SDIN0 codec ready after %lld us\n",(system_time() - start))); } if (!s1cr && (val & STA_S1CR)) { s1cr = true; - LOG(("AC_SDIN1 codec ready after %Ld us\n",(system_time() - start))); + LOG(("AC_SDIN1 codec ready after %lld us\n",(system_time() - start))); } if (!s2cr && (val & STA_S2CR)) { s2cr = true; - LOG(("AC_SDIN2 codec ready after %Ld us\n",(system_time() - start))); + LOG(("AC_SDIN2 codec ready after %lld us\n",(system_time() - start))); } snooze(50000); } while ((system_time() - start) < 1000000); @@ -769,9 +769,9 @@ uninit_driver(void) LOG(("uninit_driver()\n")); #if DEBUG - if (chan_po) LOG(("chan_po frames_count = %Ld\n",chan_po->played_frames_count)); - if (chan_pi) LOG(("chan_pi frames_count = %Ld\n",chan_pi->played_frames_count)); - if (chan_mc) LOG(("chan_mc frames_count = %Ld\n",chan_mc->played_frames_count)); + if (chan_po) LOG(("chan_po frames_count = %lld\n",chan_po->played_frames_count)); + if (chan_pi) LOG(("chan_pi frames_count = %lld\n",chan_pi->played_frames_count)); + if (chan_mc) LOG(("chan_mc frames_count = %lld\n",chan_mc->played_frames_count)); #endif /* reset all channels */ diff --git a/src/add-ons/kernel/drivers/audio/ac97/ichaudio/ichaudio.c b/src/add-ons/kernel/drivers/audio/ac97/ichaudio/ichaudio.c index bd7f305f04..85d11790e6 100644 --- a/src/add-ons/kernel/drivers/audio/ac97/ichaudio/ichaudio.c +++ b/src/add-ons/kernel/drivers/audio/ac97/ichaudio/ichaudio.c @@ -174,7 +174,7 @@ ichaudio_attach(audio_drv_t *drv, void **_cookie) LOG(("reset failed, ICH_REG_GLOB_CNT = 0x%08lx\n", value)); goto err; } - LOG(("reset finished after %Ld, ICH_REG_GLOB_CNT = 0x%08lx\n", system_time() - start, value)); + LOG(("reset finished after %lld, ICH_REG_GLOB_CNT = 0x%08lx\n", system_time() - start, value)); /* detect which codecs are ready */ s0cr = s1cr = s2cr = false; @@ -183,15 +183,15 @@ ichaudio_attach(audio_drv_t *drv, void **_cookie) value = ich_reg_read_32(cookie, ICH_REG_GLOB_STA); if (!s0cr && (value & STA_S0CR)) { s0cr = true; - LOG(("AC_SDIN0 codec ready after %Ld us\n", system_time() - start)); + LOG(("AC_SDIN0 codec ready after %lld us\n", system_time() - start)); } if (!s1cr && (value & STA_S1CR)) { s1cr = true; - LOG(("AC_SDIN1 codec ready after %Ld us\n", system_time() - start)); + LOG(("AC_SDIN1 codec ready after %lld us\n", system_time() - start)); } if (!s2cr && (value & STA_S2CR)) { s2cr = true; - LOG(("AC_SDIN2 codec ready after %Ld us\n", system_time() - start)); + LOG(("AC_SDIN2 codec ready after %lld us\n", system_time() - start)); } snooze(50000); } while ((system_time() - start) < 1000000); diff --git a/src/add-ons/kernel/drivers/audio/cmedia/pcm.c b/src/add-ons/kernel/drivers/audio/cmedia/pcm.c index 02fafa347f..a23eb43adc 100644 --- a/src/add-ons/kernel/drivers/audio/cmedia/pcm.c +++ b/src/add-ons/kernel/drivers/audio/cmedia/pcm.c @@ -1488,10 +1488,10 @@ pcm_write( { bigtime_t delta = system_time() - the_time; if (delta < 1) { - ddprintf(("cmedia_pci: delta %Ld (low!) #%ld\n", delta, put_cnt)); + ddprintf(("cmedia_pci: delta %lld (low!) #%ld\n", delta, put_cnt)); } else if (delta > 2000) { - ddprintf(("cmedia_pci: delta %Ld (high!) #%ld\n", delta, put_cnt)); + ddprintf(("cmedia_pci: delta %lld (high!) #%ld\n", delta, put_cnt)); } } if (put_cnt != int_cnt) { diff --git a/src/add-ons/kernel/drivers/disk/norflash/norflash.cpp b/src/add-ons/kernel/drivers/disk/norflash/norflash.cpp index 5dbbb650eb..fb76a81c4b 100644 --- a/src/add-ons/kernel/drivers/disk/norflash/norflash.cpp +++ b/src/add-ons/kernel/drivers/disk/norflash/norflash.cpp @@ -143,7 +143,7 @@ static status_t nor_read(void *_cookie, off_t position, void *data, size_t *numbytes) { nor_driver_info *info = (nor_driver_info*)_cookie; - TRACE("read(%Ld,%lu)\n", position, *numbytes); + TRACE("read(%lld,%lu)\n", position, *numbytes); position += HIDDEN_BLOCKS * info->blocksize; @@ -159,7 +159,7 @@ nor_read(void *_cookie, off_t position, void *data, size_t *numbytes) static status_t nor_write(void *_cookie, off_t position, const void *data, size_t *numbytes) { - TRACE("write(%Ld,%lu)\n", position, *numbytes); + TRACE("write(%lld,%lu)\n", position, *numbytes); *numbytes = 0; return B_ERROR; } diff --git a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp index 0544b99d07..4985e04a9a 100644 --- a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp +++ b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp @@ -896,7 +896,7 @@ cd_ioctl(void* cookie, uint32 op, void* buffer, size_t length) static void cd_set_capacity(cd_driver_info* info, uint64 capacity, uint32 blockSize, uint32 physicalBlockSize) { - TRACE("cd_set_capacity(info = %p, capacity = %Ld, blockSize = %ld)\n", + TRACE("cd_set_capacity(info = %p, capacity = %lld, blockSize = %ld)\n", info, capacity, blockSize); if (info->block_size != blockSize) { diff --git a/src/add-ons/kernel/drivers/dvb/cx23882/cx23882.c b/src/add-ons/kernel/drivers/dvb/cx23882/cx23882.c index b0d33e5c50..91fd50470b 100644 --- a/src/add-ons/kernel/drivers/dvb/cx23882/cx23882.c +++ b/src/add-ons/kernel/drivers/dvb/cx23882/cx23882.c @@ -211,7 +211,7 @@ cx23882_mpegts_int(cx23882_device *device) if (mstat & TS_INT_STAT_TS_RISC1) { int32 count; -// dprintf("cx23882_mpegts_int buffer 1 at %Ld\n", system_time()); +// dprintf("cx23882_mpegts_int buffer 1 at %lld\n", system_time()); device->capture_data = device->dma_buf1_virt; device->capture_end_time = system_time(); get_sem_count(device->capture_sem, &count); @@ -221,7 +221,7 @@ cx23882_mpegts_int(cx23882_device *device) if (mstat & TS_INT_STAT_TS_RISC2) { int32 count; -// dprintf("cx23882_mpegts_int buffer 2 at %Ld\n", system_time()); +// dprintf("cx23882_mpegts_int buffer 2 at %lld\n", system_time()); device->capture_data = device->dma_buf2_virt; device->capture_end_time = system_time(); get_sem_count(device->capture_sem, &count); diff --git a/src/add-ons/kernel/drivers/input/wacom/wacom.c b/src/add-ons/kernel/drivers/input/wacom/wacom.c index 34ef083950..5d3774e249 100644 --- a/src/add-ons/kernel/drivers/input/wacom/wacom.c +++ b/src/add-ons/kernel/drivers/input/wacom/wacom.c @@ -532,7 +532,7 @@ device_read(void* cookie, off_t pos, void* buf, size_t* count) ret = device->notify_lock; - DPRINTF_INFO((ID "device_read(%p,%Ld,0x%x,%d) name = \"%s%d\"\n", + DPRINTF_INFO((ID "device_read(%p,%lld,0x%x,%d) name = \"%s%d\"\n", cookie, pos, buf, *count, kBasePublishPath, device->number)); if (ret >= B_OK) { diff --git a/src/add-ons/kernel/drivers/network/tun/driver.c b/src/add-ons/kernel/drivers/network/tun/driver.c index 65a14d7237..1ebf7dbc5c 100644 --- a/src/add-ons/kernel/drivers/network/tun/driver.c +++ b/src/add-ons/kernel/drivers/network/tun/driver.c @@ -352,7 +352,7 @@ tun_deselect(cookie_t *cookie, uint8 event, selectsync *sync) status_t tun_readv(cookie_t *cookie, off_t position, const iovec *vec, size_t count, size_t *numBytes) { - dprintf("tun: readv(, %Ld, , %ld)\n", position, count); + dprintf("tun: readv(, %lld, , %ld)\n", position, count); return EOPNOTSUPP; } @@ -360,7 +360,7 @@ tun_readv(cookie_t *cookie, off_t position, const iovec *vec, size_t count, size status_t tun_writev(cookie_t *cookie, off_t position, const iovec *vec, size_t count, size_t *numBytes) { - dprintf("tun: writev(, %Ld, , %ld)\n", position, count); + dprintf("tun: writev(, %lld, , %ld)\n", position, count); return EOPNOTSUPP; } diff --git a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp index b95882b7da..d0d75b4417 100644 --- a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp +++ b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp @@ -689,7 +689,7 @@ pc_serial_open(const char *name, uint32 flags, void **cookie) status_t pc_serial_read(void *cookie, off_t position, void *buffer, size_t *numBytes) { - TRACE_FUNCALLS("> pc_serial_read(0x%08x, %Ld, 0x%08x, %d)\n", cookie, + TRACE_FUNCALLS("> pc_serial_read(0x%08x, %lld, 0x%08x, %d)\n", cookie, position, buffer, *numBytes); SerialDevice *device = (SerialDevice *)cookie; return device->Read((char *)buffer, numBytes); @@ -701,7 +701,7 @@ status_t pc_serial_write(void *cookie, off_t position, const void *buffer, size_t *numBytes) { - TRACE_FUNCALLS("> pc_serial_write(0x%08x, %Ld, 0x%08x, %d)\n", cookie, + TRACE_FUNCALLS("> pc_serial_write(0x%08x, %lld, 0x%08x, %d)\n", cookie, position, buffer, *numBytes); SerialDevice *device = (SerialDevice *)cookie; return device->Write((const char *)buffer, numBytes); diff --git a/src/add-ons/kernel/drivers/ports/usb_serial/Driver.cpp b/src/add-ons/kernel/drivers/ports/usb_serial/Driver.cpp index fb88813c9e..74f6734e45 100644 --- a/src/add-ons/kernel/drivers/ports/usb_serial/Driver.cpp +++ b/src/add-ons/kernel/drivers/ports/usb_serial/Driver.cpp @@ -237,7 +237,7 @@ usb_serial_open(const char *name, uint32 flags, void **cookie) static status_t usb_serial_read(void *cookie, off_t position, void *buffer, size_t *numBytes) { - TRACE_FUNCALLS("> usb_serial_read(0x%08x, %Ld, 0x%08x, %d)\n", cookie, + TRACE_FUNCALLS("> usb_serial_read(0x%08x, %lld, 0x%08x, %d)\n", cookie, position, buffer, *numBytes); SerialDevice *device = (SerialDevice *)cookie; status_t status = device->Read((char *)buffer, numBytes); @@ -251,7 +251,7 @@ static status_t usb_serial_write(void *cookie, off_t position, const void *buffer, size_t *numBytes) { - TRACE_FUNCALLS("> usb_serial_write(0x%08x, %Ld, 0x%08x, %d)\n", cookie, + TRACE_FUNCALLS("> usb_serial_write(0x%08x, %lld, 0x%08x, %d)\n", cookie, position, buffer, *numBytes); SerialDevice *device = (SerialDevice *)cookie; status_t status = device->Write((const char *)buffer, numBytes); diff --git a/src/add-ons/kernel/file_cache/launch_speedup.cpp b/src/add-ons/kernel/file_cache/launch_speedup.cpp index 562c2b3d82..90d3d511ef 100644 --- a/src/add-ons/kernel/file_cache/launch_speedup.cpp +++ b/src/add-ons/kernel/file_cache/launch_speedup.cpp @@ -398,7 +398,7 @@ Session::Session(team_id team, const char *name, dev_t device, fNodeRef.device = device; fNodeRef.node = node; - TRACE(("start session %ld:%Ld \"%s\", system_time: %Ld, active until: %Ld\n", + TRACE(("start session %ld:%lld \"%s\", system_time: %lld, active until: %lld\n", device, node, Name(), system_time(), fActiveUntil)); } @@ -589,7 +589,7 @@ Session::Save() char name[B_OS_NAME_LENGTH + 25]; if (!IsMainSession()) { - snprintf(name, sizeof(name), "/etc/launch_cache/%ld:%Ld %s", + snprintf(name, sizeof(name), "/etc/launch_cache/%ld:%lld %s", fNodeRef.device, fNodeRef.node, Name()); } else snprintf(name, sizeof(name), "/etc/launch_cache/%s", Name()); @@ -610,7 +610,7 @@ Session::Save() NodeTable::Iterator iterator(fNodeHash); while (iterator.HasNext()) { struct node *node = iterator.Next(); - snprintf(name, sizeof(name), "%ld:%Ld\n", node->ref.device, node->ref.node); + snprintf(name, sizeof(name), "%ld:%lld\n", node->ref.device, node->ref.node); ssize_t bytesWritten = write(fd, name, strlen(name)); if (bytesWritten < B_OK) { @@ -790,7 +790,7 @@ launch_speedup_control(const char *subsystem, uint32 function, return B_BAD_VALUE; if (!strcmp(name, "system boot")) - dprintf("STOP BOOT %Ld\n", system_time()); + dprintf("STOP BOOT %lld\n", system_time()); sMainSession->Lock(); stop_session(sMainSession); @@ -872,7 +872,7 @@ init() sMainSession = start_session(-1, -1, -1, "system boot"); sMainSession->Unlock(); - dprintf("START BOOT %Ld\n", system_time()); + dprintf("START BOOT %lld\n", system_time()); return B_OK; err3: diff --git a/src/add-ons/kernel/file_cache/log.cpp b/src/add-ons/kernel/file_cache/log.cpp index 3c8aa4690c..0dcbd7cecb 100644 --- a/src/add-ons/kernel/file_cache/log.cpp +++ b/src/add-ons/kernel/file_cache/log.cpp @@ -115,7 +115,7 @@ log_node_opened(void *vnode, int32 fdType, mount_id device, vnode_id parent, log->node = node; log->timestamp = system_time(); - TRACE(("log: added entry %s, <%c%d> %ld:%Ld:%Ld:%s\n", log->team_name, log->action, + TRACE(("log: added entry %s, <%c%d> %ld:%lld:%lld:%s\n", log->team_name, log->action, log->type, device, parent, node, log->file_name)); put_log_entry(log); @@ -141,7 +141,7 @@ log_node_closed(void *vnode, int32 fdType, mount_id device, vnode_id node, int32 log->access_type = accessType; - TRACE(("log: added entry %s, %ld:%Ld, %ld\n", + TRACE(("log: added entry %s, %ld:%lld, %ld\n", log->team_name, log->type, device, node, accessType)); put_log_entry(log); @@ -196,7 +196,7 @@ log_node_launched(size_t argCount, char * const *args) log->parent = -1; } - TRACE(("log: added entry %s, %ld:%Ld %s ...\n", log->team_name, + TRACE(("log: added entry %s, %ld:%lld %s ...\n", log->team_name, log->device, log->parent, args[0])); put_log_entry(log); @@ -272,7 +272,7 @@ log_writer_daemon(void *arg, int /*iteration*/) switch (log->action) { case 'l': // launch - length = snprintf(line, sizeof(line), "%ld: %Ld \"%s\" l %ld:%Ld %ld \"%s\" ", + length = snprintf(line, sizeof(line), "%ld: %lld \"%s\" l %ld:%lld %ld \"%s\" ", log->team, log->timestamp, log->team_name, log->device, log->parent, log->launch.parent, log->launch.args[0]); @@ -300,14 +300,14 @@ log_writer_daemon(void *arg, int /*iteration*/) break; case 'c': // close - length = snprintf(line, sizeof(line), "%ld: %Ld \"%s\" c%d %ld:%Ld %ld\n", + length = snprintf(line, sizeof(line), "%ld: %lld \"%s\" c%d %ld:%lld %ld\n", log->team, log->timestamp, log->team_name, log->type, log->device, log->node, log->access_type); length = std::min(length, (ssize_t)sizeof(line) - 1); break; default: // open, ? - length = snprintf(line, sizeof(line), "%ld: %Ld \"%s\" %c%d %ld:%Ld:%Ld:\"%s\"\n", + length = snprintf(line, sizeof(line), "%ld: %lld \"%s\" %c%d %ld:%lld:%lld:\"%s\"\n", log->team, log->timestamp, log->team_name, log->action, log->type, log->device, log->parent, log->node, log->file_name); length = std::min(length, (ssize_t)sizeof(line) - 1); diff --git a/src/add-ons/kernel/file_cache/rule_based_prefetcher.cpp b/src/add-ons/kernel/file_cache/rule_based_prefetcher.cpp index c1c033531b..8b6eae4f94 100644 --- a/src/add-ons/kernel/file_cache/rule_based_prefetcher.cpp +++ b/src/add-ons/kernel/file_cache/rule_based_prefetcher.cpp @@ -412,7 +412,7 @@ load_rules() if (name != NULL) { eat_spaces(line); int32 confidence = strtoul(line, &line, 10); - TRACE(("c %ld:%Ld:%s %s %ld\n", device, node, fileName, name, confidence)); + TRACE(("c %ld:%lld:%s %s %ld\n", device, node, fileName, name, confidence)); struct head *head = new ::head; head->device = device; @@ -506,7 +506,7 @@ Rule::Apply() if (vfs_entry_ref_to_vnode(head->device, head->parent, head->name, &vnode) == B_OK) { vfs_vnode_to_node_ref(vnode, &head->device, &head->node); - TRACE(("prefetch: %ld:%Ld:%s\n", head->device, head->parent, head->name)); + TRACE(("prefetch: %ld:%lld:%s\n", head->device, head->parent, head->name)); cache_prefetch(head->device, head->node, 0, ~0UL); // ToDo: put head into a hash so that some statistics can be backpropagated quickly @@ -543,11 +543,11 @@ Rule::Dump() struct head *head = NULL; while ((head = (struct head *)list_get_next_item(&fHeads, head)) != NULL) { - dprintf(" %ld:%Ld:\"%s\", ", head->device, head->parent, head->name); + dprintf(" %ld:%lld:\"%s\", ", head->device, head->parent, head->name); if (head->confidence < sMinConfidence) dprintf("-\n"); else - dprintf("%ld (%ld), %Ld us\n", head->used_count, + dprintf("%ld (%ld), %lld us\n", head->used_count, head->used_count - fAppliedCount, head->timestamp); } } @@ -697,7 +697,7 @@ node_opened(struct vnode *vnode, int32 fdType, dev_t device, vnode_id parent, && vfs_get_vnode_name(vnode, buffer, sizeof(buffer)) == B_OK) name = buffer; - //dprintf("opened: %ld:%Ld:%Ld:%s (%s)\n", device, parent, node, name, thread_get_current_thread()->name); + //dprintf("opened: %ld:%lld:%lld:%s (%s)\n", device, parent, node, name, thread_get_current_thread()->name); RuleMatcher matcher(team_get_current_team_id(), name); matcher.GotFile(device, node); } diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index 6cc66af7d6..cd168a0b62 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -113,7 +113,7 @@ public: virtual void AddDump(TraceOutput& out) { - out.Print("bfs:%s: block %Ld (%p), sum %lu, s/l %lu/%lu", fLabel, + out.Print("bfs:%s: block %lld (%p), sum %lu, s/l %lu/%lu", fLabel, fBlock, fData, fSum, fStart, fLength); } diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.cpp b/src/add-ons/kernel/file_systems/bfs/Inode.cpp index 28c1bbb0d0..417e995c18 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Inode.cpp @@ -39,7 +39,7 @@ public: virtual void AddDump(TraceOutput& out) { - out.Print("bfs:Create %Ld (%p), parent %Ld (%p), \"%s\", " + out.Print("bfs:Create %lld (%p), parent %lld (%p), \"%s\", " "mode %lx, omode %x, type %lx", fID, fInode, fParentID, fParent, fName, fMode, fOpenMode, fType); } @@ -68,7 +68,7 @@ public: virtual void AddDump(TraceOutput& out) { - out.Print("bfs:Remove %Ld (%p), \"%s\"", fID, fInode, fName); + out.Print("bfs:Remove %lld (%p), \"%s\"", fID, fInode, fName); } private: @@ -90,7 +90,7 @@ public: virtual void AddDump(TraceOutput& out) { - out.Print("bfs:%s %Ld (%p)\n", fAction, fID, fInode); + out.Print("bfs:%s %lld (%p)\n", fAction, fID, fInode); } private: @@ -114,7 +114,7 @@ public: virtual void AddDump(TraceOutput& out) { - out.Print("bfs:%s %Ld (%p), %Ld -> %Ld", fTrim ? "Trim" : "Resize", + out.Print("bfs:%s %lld (%p), %lld -> %lld", fTrim ? "Trim" : "Resize", fID, fInode, fOldSize, fNewSize); } diff --git a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp index a1b79d2ddf..a6514e2cfa 100644 --- a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp @@ -283,7 +283,7 @@ static status_t bfs_get_vnode(fs_volume* _volume, ino_t id, fs_vnode* _node, int* _type, uint32* _flags, bool reenter) { - //FUNCTION_START(("ino_t = %Ld\n", id)); + //FUNCTION_START(("ino_t = %lld\n", id)); Volume* volume = (Volume*)_volume->private_volume; // first inode may be after the log area, we don't go through @@ -539,7 +539,7 @@ bfs_get_file_map(fs_volume* _volume, fs_vnode* _node, off_t offset, size_t size, block_run run; off_t fileOffset; - //FUNCTION_START(("offset = %Ld, size = %lu\n", offset, size)); + //FUNCTION_START(("offset = %lld, size = %lu\n", offset, size)); while (true) { status_t status = inode->FindBlockRun(offset, run, fileOffset); @@ -604,7 +604,7 @@ bfs_lookup(fs_volume* _volume, fs_vnode* _directory, const char* file, status = tree->Find((uint8*)file, (uint16)strlen(file), _vnodeID); if (status != B_OK) { - //PRINT(("bfs_walk() could not find %Ld:\"%s\": %s\n", directory->BlockNumber(), file, strerror(status))); + //PRINT(("bfs_walk() could not find %lld:\"%s\": %s\n", directory->BlockNumber(), file, strerror(status))); if (status == B_ENTRY_NOT_FOUND) entry_cache_add_missing(volume->ID(), directory->ID(), file); diff --git a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp index ad10380e89..42fb09bd02 100644 --- a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp @@ -1689,7 +1689,7 @@ cdda_read(fs_volume* _volume, fs_vnode* _node, void* _cookie, off_t offset, Volume* volume = (Volume*)_volume->private_volume; Inode* inode = (Inode*)_node->private_node; - TRACE(("cdda_read(vnode = %p, offset %Ld, length = %lu, mode = %d)\n", + TRACE(("cdda_read(vnode = %p, offset %lld, length = %lu, mode = %d)\n", _node, offset, *_length, cookie->open_mode)); if (S_ISDIR(inode->Type())) diff --git a/src/add-ons/kernel/file_systems/iso9660/iso9660.cpp b/src/add-ons/kernel/file_systems/iso9660/iso9660.cpp index 38ba4fbeec..47a5f19e1e 100644 --- a/src/add-ons/kernel/file_systems/iso9660/iso9660.cpp +++ b/src/add-ons/kernel/file_systems/iso9660/iso9660.cpp @@ -691,7 +691,7 @@ ISOMount(const char *path, uint32 flags, iso9660_volume **_newVolume, maxBlocks = volume->volSpaceSize[FS_DATA_FORMAT]; /* Initialize access to the cache so that we can do cached i/o */ - TRACE(("ISO9660: cache init: dev %d, max blocks %Ld\n", volume->fd, maxBlocks)); + TRACE(("ISO9660: cache init: dev %d, max blocks %lld\n", volume->fd, maxBlocks)); volume->fBlockCache = block_cache_create(volume->fd, maxBlocks, volume->logicalBlkSize[FS_DATA_FORMAT], true); isISO = true; @@ -802,8 +802,8 @@ ISOReadDirEnt(iso9660_volume *volume, dircookie *cookie, struct dirent *dirent, if (node.name_length <= nameBufferSize) { // need to do some size checking here. strlcpy(dirent->d_name, node.name, node.name_length + 1); - TRACE(("ISOReadDirEnt - success, name is %s, block %Ld, " - "pos %Ld, inode id %Ld\n", dirent->d_name, cookie->block, + TRACE(("ISOReadDirEnt - success, name is %s, block %lld, " + "pos %lld, inode id %lld\n", dirent->d_name, cookie->block, cookie->pos, dirent->d_ino)); } else { // TODO: this can be just normal if we support reading more diff --git a/src/add-ons/kernel/file_systems/iso9660/kernel_interface.cpp b/src/add-ons/kernel/file_systems/iso9660/kernel_interface.cpp index fc7aee3533..4d740bbfb1 100644 --- a/src/add-ons/kernel/file_systems/iso9660/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/iso9660/kernel_interface.cpp @@ -287,7 +287,7 @@ fs_walk(fs_volume* _volume, fs_vnode* _base, const char* file, ino_t* _vnodeID) iso9660_inode node; int initResult; - TRACE(("fs_walk - read buffer from disk at LBN %Ld into buffer " + TRACE(("fs_walk - read buffer from disk at LBN %lld into buffer " "%p.\n", block, blockData)); // Move to the next block if necessary @@ -304,11 +304,11 @@ fs_walk(fs_volume* _volume, fs_vnode* _base, const char* file, ino_t* _vnodeID) if (initResult == B_OK) { if ((node.flags & ISO_IS_ASSOCIATED_FILE) == 0 && !strcmp(node.name, file)) { - TRACE(("fs_walk - success, found vnode at block %Ld, pos " - "%Ld\n", block, blockBytesRead)); + TRACE(("fs_walk - success, found vnode at block %lld, pos " + "%lld\n", block, blockBytesRead)); *_vnodeID = (block << 30) + (blockBytesRead & 0xffffffff); - TRACE(("fs_walk - New vnode id is %Ld\n", *_vnodeID)); + TRACE(("fs_walk - New vnode id is %lld\n", *_vnodeID)); result = get_vnode(_volume, *_vnodeID, (void**)&newNode); if (result == B_OK) { @@ -328,13 +328,13 @@ fs_walk(fs_volume* _volume, fs_vnode* _base, const char* file, ino_t* _vnodeID) blockBytesRead += bytesRead; TRACE(("fs_walk - Adding %u bytes to blockBytes read (total " - "%Ld/%u).\n", (unsigned)bytesRead, blockBytesRead, + "%lld/%u).\n", (unsigned)bytesRead, blockBytesRead, (unsigned)baseNode->dataLen[FS_DATA_FORMAT])); } totalRead += volume->logicalBlkSize[FS_DATA_FORMAT]; block++; - TRACE(("fs_walk - moving to next block %Ld, total read %u\n", + TRACE(("fs_walk - moving to next block %lld, total read %u\n", block, (unsigned)totalRead)); block_cache_put(volume->fBlockCache, cachedBlock); } diff --git a/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp b/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp index 5298bc4ebf..24b11ad0c7 100644 --- a/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp @@ -87,7 +87,7 @@ DataContainer::GetCache() status_t DataContainer::Resize(off_t newSize) { -// PRINT("DataContainer::Resize(%Ld), fSize: %Ld\n", newSize, fSize); +// PRINT("DataContainer::Resize(%lld), fSize: %lld\n", newSize, fSize); status_t error = B_OK; if (_RequiresCacheMode(newSize)) { @@ -125,7 +125,7 @@ DataContainer::Resize(off_t newSize) fSize = newSize; -// PRINT("DataContainer::Resize() done: %lx, fSize: %Ld\n", error, fSize); +// PRINT("DataContainer::Resize() done: %lx, fSize: %lld\n", error, fSize); return error; } @@ -170,7 +170,7 @@ status_t DataContainer::WriteAt(off_t offset, const void *_buffer, size_t size, size_t *bytesWritten) { - PRINT("DataContainer::WriteAt(%Ld, %p, %lu, %p), fSize: %Ld\n", offset, _buffer, size, bytesWritten, fSize); + PRINT("DataContainer::WriteAt(%lld, %p, %lu, %p), fSize: %lld\n", offset, _buffer, size, bytesWritten, fSize); const uint8 *buffer = (const uint8*)_buffer; status_t error = (buffer && offset >= 0 && bytesWritten @@ -202,7 +202,7 @@ DataContainer::WriteAt(off_t offset, const void *_buffer, size_t size, // cache mode error = _DoCacheIO(offset, (uint8*)buffer, size, bytesWritten, true); - PRINT("DataContainer::WriteAt() done: %lx, fSize: %Ld\n", error, fSize); + PRINT("DataContainer::WriteAt() done: %lx, fSize: %lld\n", error, fSize); return error; } diff --git a/src/add-ons/kernel/file_systems/ramfs/Index.cpp b/src/add-ons/kernel/file_systems/ramfs/Index.cpp index 2797d1702f..b9b493fb80 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Index.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/Index.cpp @@ -78,7 +78,7 @@ Index::Dump() PRINT("Index: `%s', type: %lx\n", GetName(), GetType()); for (IndexEntryIterator it(this); it.GetCurrent(); it.GetNext()) { Entry *entry = it.GetCurrent(); - PRINT(" entry: `%s', dir: %Ld\n", entry->GetName(), + PRINT(" entry: `%s', dir: %lld\n", entry->GetName(), entry->GetParent()->GetID()); } ) diff --git a/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp index 5fad7ef2a8..eed3a2c49d 100644 --- a/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp @@ -235,7 +235,7 @@ ramfs_get_vnode(fs_volume* _volume, ino_t vnid, fs_vnode* node, int* _type, uint32* _flags, bool reenter) { // FUNCTION_START(); - FUNCTION(("node: %Ld\n", vnid)); + FUNCTION(("node: %lld\n", vnid)); Volume* volume = (Volume*)_volume->private_volume; Node *foundNode = NULL; status_t error = B_OK; @@ -259,7 +259,7 @@ ramfs_write_vnode(fs_volume* /*fs*/, fs_vnode* DARG(_node), bool /*reenter*/) // called from another FS may cause the VFS layer to free vnodes and thus // invoke this hook. // FUNCTION_START(); -//FUNCTION(("node: %Ld\n", ((Node*)_node)->GetID())); +//FUNCTION(("node: %lld\n", ((Node*)_node)->GetID())); status_t error = B_OK; RETURN_ERROR(error); } @@ -269,7 +269,7 @@ ramfs_write_vnode(fs_volume* /*fs*/, fs_vnode* DARG(_node), bool /*reenter*/) static status_t ramfs_remove_vnode(fs_volume* _volume, fs_vnode* _node, bool /*reenter*/) { - FUNCTION(("node: %Ld\n", ((Node*)_node)->GetID())); + FUNCTION(("node: %lld\n", ((Node*)_node)->GetID())); Volume* volume = (Volume*)_volume->private_volume; Node* node = (Node*)_node->private_node; @@ -552,7 +552,7 @@ ramfs_rename(fs_volume* _volume, fs_vnode* _oldDir, const char *oldName, status_t error = B_OK; if (VolumeWriteLocker locker = volume) { -FUNCTION(("old dir: %Ld, old name: `%s', new dir: %Ld, new name: `%s'\n", +FUNCTION(("old dir: %lld, old name: `%s', new dir: %lld, new name: `%s'\n", oldDir->GetID(), oldName, newDir->GetID(), newName)); NodeMTimeUpdater mTimeUpdater1(oldDir); NodeMTimeUpdater mTimeUpdater2(newDir); @@ -682,7 +682,7 @@ ramfs_read_stat(fs_volume* _volume, fs_vnode* _node, struct stat *st) Volume* volume = (Volume*)_volume->private_volume; Node* node = (Node*)_node->private_node; - FUNCTION(("node: %Ld\n", node->GetID())); + FUNCTION(("node: %lld\n", node->GetID())); status_t error = B_OK; if (VolumeReadLocker locker = volume) { st->st_dev = volume->GetID(); @@ -879,7 +879,7 @@ ramfs_open(fs_volume* _volume, fs_vnode* _node, int openMode, void** _cookie) Volume* volume = (Volume*)_volume->private_volume; Node* node = (Node*)_node->private_node; - FUNCTION(("node: %Ld\n", node->GetID())); + FUNCTION(("node: %lld\n", node->GetID())); status_t error = B_OK; if (VolumeReadLocker locker = volume) { // directory can be opened read-only @@ -922,7 +922,7 @@ ramfs_close(fs_volume* _volume, fs_vnode* _node, void* /*cookie*/) Volume* volume = (Volume*)_volume->private_volume; Node* node = (Node*)_node->private_node; - FUNCTION(("node: %Ld\n", node->GetID())); + FUNCTION(("node: %lld\n", node->GetID())); status_t error = B_OK; // notify listeners if (VolumeReadLocker locker = volume) { @@ -955,7 +955,7 @@ ramfs_read(fs_volume* _volume, fs_vnode* _node, void* _cookie, off_t pos, Node* node = (Node*)_node->private_node; FileCookie *cookie = (FileCookie*)_cookie; -// FUNCTION(("((%lu, %lu), %Ld, %p, %lu)\n", node->GetDirID(), +// FUNCTION(("((%lu, %lu), %lld, %p, %lu)\n", node->GetDirID(), // node->GetObjectID(), pos, buffer, *bufferSize)); status_t error = B_OK; if (VolumeReadLocker locker = volume) { @@ -992,7 +992,7 @@ ramfs_write(fs_volume* _volume, fs_vnode* _node, void* _cookie, off_t pos, Node* node = (Node*)_node->private_node; FileCookie *cookie = (FileCookie*)_cookie; -// FUNCTION(("((%lu, %lu), %Ld, %p, %lu)\n", node->GetDirID(), +// FUNCTION(("((%lu, %lu), %lld, %p, %lu)\n", node->GetDirID(), // node->GetObjectID(), pos, buffer, *bufferSize)); status_t error = B_OK; if (VolumeWriteLocker locker = volume) { @@ -1077,7 +1077,7 @@ fGetNextCounter++; *entryName = entry->GetName(); } } - PRINT("EntryIterator %" B_PRId32 ", GetNext() counter: %" B_PRId32 ", entry: %p (%Ld)\n", + PRINT("EntryIterator %" B_PRId32 ", GetNext() counter: %" B_PRId32 ", entry: %p (%lld)\n", fIteratorID, fGetNextCounter, fIterator.GetCurrent(), (fIterator.GetCurrent() ? fIterator.GetCurrent()->GetNode()->GetID() : -1)); diff --git a/src/add-ons/kernel/file_systems/reiserfs/Iterators.cpp b/src/add-ons/kernel/file_systems/reiserfs/Iterators.cpp index f5a99e674e..31237b1e8b 100644 --- a/src/add-ons/kernel/file_systems/reiserfs/Iterators.cpp +++ b/src/add-ons/kernel/file_systems/reiserfs/Iterators.cpp @@ -605,7 +605,7 @@ ItemIterator::GoToNext(Item *item) LeafNode *node = NULL; status_t error = _GetLeafNode(&node); if (error == B_OK) { -//PRINT((" leaf node: %Ld\n", node->GetNumber())); +//PRINT((" leaf node: %lld\n", node->GetNumber())); // get the leaf node on which the next item resides int32 newIndex = fIndex + 1; while (error == B_OK && newIndex >= node->CountItems()) { @@ -614,7 +614,7 @@ ItemIterator::GoToNext(Item *item) } // got the node, get the item if (error == B_OK) { -//PRINT((" leaf node now: %Ld\n", node->GetNumber())); +//PRINT((" leaf node now: %lld\n", node->GetNumber())); fIndex = newIndex; //PRINT((" index now: %ld\n", fIndex)); if (item) @@ -1315,7 +1315,7 @@ status_t StreamReader::ReadAt(off_t position, void *buffer, size_t bufferSize, size_t *_bytesRead) { -//PRINT(("StreamReader::ReadAt(%Ld, %p, %lu)\n", position, buffer, bufferSize)); +//PRINT(("StreamReader::ReadAt(%lld, %p, %lu)\n", position, buffer, bufferSize)); status_t error = (position >= 0 && buffer && _bytesRead ? InitCheck() : B_BAD_VALUE); // get the size of the stream @@ -1334,7 +1334,7 @@ StreamReader::ReadAt(off_t position, void *buffer, size_t bufferSize, size_t bytesRead = 0; while (error == B_OK && bufferSize > 0 && (error = _SeekTo(position)) == B_OK) { -//PRINT((" seeked to %Ld: fItemOffset: %Ld, fItemSize: %Ld\n", position, +//PRINT((" seeked to %lld: fItemOffset: %lld, fItemSize: %lld\n", position, //fItemOffset, fItemSize)); off_t inItemOffset = max_c(0LL, position - fItemOffset); off_t toRead = min_c(fItemSize - inItemOffset, (off_t)bufferSize); @@ -1500,7 +1500,7 @@ RETURN_ERROR(error); status_t StreamReader::_ReadIndirectItem(off_t offset, void *buffer, size_t bufferSize) { -//PRINT(("StreamReader::_ReadIndirectItem(%Ld, %p, %lu)\n", offset, buffer, bufferSize)); +//PRINT(("StreamReader::_ReadIndirectItem(%lld, %p, %lu)\n", offset, buffer, bufferSize)); status_t error = B_OK; IndirectItem &indirect = *static_cast(&fItem); // skip items until the offset is reached @@ -1543,7 +1543,7 @@ StreamReader::_ReadIndirectItem(off_t offset, void *buffer, size_t bufferSize) status_t StreamReader::_ReadDirectItem(off_t offset, void *buffer, size_t bufferSize) { -//PRINT(("StreamReader::_ReadDirectItem(%Ld, %p, %lu)\n", offset, buffer, bufferSize)); +//PRINT(("StreamReader::_ReadDirectItem(%lld, %p, %lu)\n", offset, buffer, bufferSize)); // copy the data into the buffer memcpy(buffer, reinterpret_cast(fItem.GetData()) + offset, bufferSize); diff --git a/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp b/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp index 95114f51eb..0064e1e5e2 100644 --- a/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/udf/kernel_interface.cpp @@ -76,8 +76,8 @@ iterative_io_finished_hook(void *cookie, io_request *request, status_t status, static float udf_identify_partition(int fd, partition_data *partition, void **_cookie) { - TRACE(("udf_identify_partition: fd = %d, id = %ld, offset = %Ld, size = %Ld " - "content_size = %Ld, block_size = %lu\n", fd, partition->id, + TRACE(("udf_identify_partition: fd = %d, id = %ld, offset = %lld, size = %lld " + "content_size = %lld, block_size = %lu\n", fd, partition->id, partition->offset, partition->size, partition->content_size, partition->block_size)); @@ -180,7 +180,7 @@ udf_get_vnode(fs_volume *_volume, ino_t id, fs_vnode *node, int *_type, // Convert the given vnode id to an address, and create // and return a corresponding Icb object for it. - TRACE(("udf_get_vnode: id = %Ld, blockSize = %lu\n", id, + TRACE(("udf_get_vnode: id = %lld, blockSize = %lu\n", id, volume->BlockSize())); Icb *icb = new(std::nothrow) Icb(volume, @@ -233,7 +233,7 @@ udf_lookup(fs_volume *_volume, fs_vnode *_directory, const char *file, if (status != B_OK) return B_ENTRY_NOT_FOUND; } - TRACE(("udf_lookup: vnodeId = %Ld found!\n", *vnodeID)); + TRACE(("udf_lookup: vnodeId = %lld found!\n", *vnodeID)); return B_OK; } @@ -282,7 +282,7 @@ udf_read_stat(fs_volume *_volume, fs_vnode *node, struct stat *stat) stat->st_nlink = icb->FileLinkCount(); stat->st_blksize = volume->BlockSize(); - TRACE(("udf_read_stat: st_dev = %ld, st_ino = %Ld, st_blksize = %d\n", + TRACE(("udf_read_stat: st_dev = %ld, st_ino = %lld, st_blksize = %d\n", stat->st_dev, stat->st_ino, stat->st_blksize)); stat->st_uid = icb->Uid(); @@ -302,7 +302,7 @@ udf_read_stat(fs_volume *_volume, fs_vnode *node, struct stat *stat) //icb->GetChangeTime(stat->st_ctim); //icb->GetCreationTime(stat->st_crtim); - TRACE(("udf_read_stat: mode = 0x%x, st_ino: %Ld\n", stat->st_mode, + TRACE(("udf_read_stat: mode = 0x%x, st_ino: %lld\n", stat->st_mode, stat->st_ino)); return B_OK; @@ -564,8 +564,8 @@ udf_mount(fs_volume *_volume, const char *_device, uint32 flags, if (ioctl(device, B_GET_PARTITION_INFO, &info, sizeof(partition_info)) == 0) { TRACE(("partition_info:\n")); - TRACE(("\toffset: %Ld\n", info.offset)); - TRACE(("\tsize: %Ld\n", info.size)); + TRACE(("\toffset: %lld\n", info.offset)); + TRACE(("\tsize: %lld\n", info.size)); TRACE(("\tlogical_block_size: %ld\n", info.logical_block_size)); TRACE(("\tsession: %ld\n", info.session)); TRACE(("\tpartition: %ld\n", info.partition)); @@ -586,7 +586,7 @@ udf_mount(fs_volume *_volume, const char *_device, uint32 flags, status = fstat(device, &stat) < 0 ? B_ERROR : B_OK; if (!status) { TRACE(("stat_info:\n")); - TRACE(("\tst_size: %Ld\n", stat.st_size)); + TRACE(("\tst_size: %lld\n", stat.st_size)); deviceOffset = 0; numBlock = stat.st_size / 2048; } diff --git a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp index f31966accd..735f3021f6 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp @@ -4441,7 +4441,7 @@ Volume::_IncrementVNodeCount(ino_t vnid) } vnode->useCount++; -//PRINT(("_IncrementVNodeCount(%Ld): count: %ld, fVNodeCountMap size: %ld\n", vnid, *count, fVNodeCountMap->Size())); +//PRINT(("_IncrementVNodeCount(%lld): count: %ld, fVNodeCountMap size: %ld\n", vnid, *count, fVNodeCountMap->Size())); } @@ -4462,7 +4462,7 @@ Volume::_DecrementVNodeCount(ino_t vnid) } vnode->useCount--; -//PRINT(("_DecrementVNodeCount(%Ld): count: %ld, fVNodeCountMap size: %ld\n", vnid, tmpCount, fVNodeCountMap->Size())); +//PRINT(("_DecrementVNodeCount(%lld): count: %ld, fVNodeCountMap size: %ld\n", vnid, tmpCount, fVNodeCountMap->Size())); } diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/beos/fs_cache.c b/src/add-ons/kernel/file_systems/userlandfs/server/beos/fs_cache.c index 34ac2d5ffe..ae6dbe8eb1 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/beos/fs_cache.c +++ b/src/add-ons/kernel/file_systems/userlandfs/server/beos/fs_cache.c @@ -1261,7 +1261,7 @@ beos_set_blocks_info(int dev, fs_off_t *blocks, int nblocks, /* we can call hash_lookup() here because we know it's around */ ce = hash_lookup(&bc.ht, dev, blocks[i]); if (ce == NULL) { - beos_panic("*** set_block_info can't find bnum %Ld!\n", blocks[i]); + beos_panic("*** set_block_info can't find bnum %lld!\n", blocks[i]); UNLOCK(bc.lock); return ENOENT; /* hopefully this doesn't happen... */ } @@ -1269,7 +1269,7 @@ beos_set_blocks_info(int dev, fs_off_t *blocks, int nblocks, ce->flags &= ~(CE_DIRTY | CE_BUSY); if (ce->func != NULL) { - beos_panic("*** set_block_info non-null callback on bnum %Ld\n", + beos_panic("*** set_block_info non-null callback on bnum %lld\n", ce->block_num); } @@ -1280,7 +1280,7 @@ beos_set_blocks_info(int dev, fs_off_t *blocks, int nblocks, ce->clone = (void *)malloc(ce->bsize); if (ce->clone == NULL) - beos_panic("*** can't clone bnum %Ld (bsize %d)\n", + beos_panic("*** can't clone bnum %lld (bsize %d)\n", ce->block_num, ce->bsize); @@ -1770,10 +1770,10 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz /* some sanity checks first */ if (bsize == 0) - beos_panic("cache_io: block size == 0 for bnum %Ld?!?\n", bnum); + beos_panic("cache_io: block size == 0 for bnum %lld?!?\n", bnum); if (num_blocks == 0) - beos_panic("cache_io: bnum %Ld has num_blocks == 0!\n", bnum); + beos_panic("cache_io: bnum %lld has num_blocks == 0!\n", bnum); if (data == NULL && dataptr == NULL) { printf("major butthead move: " @@ -1784,7 +1784,7 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz if (data == NULL) { if (num_blocks != 1) /* get_block() should never do that */ - beos_panic("cache_io: num_blocks %Ld but should be 1\n", + beos_panic("cache_io: num_blocks %lld but should be 1\n", num_blocks); if (op & CACHE_WRITE) @@ -1838,8 +1838,8 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz if (ce) { if (tmp != ce->block_num || dev != ce->dev) { UNLOCK(bc.lock); - beos_panic("*** error4: looked up dev %d block %Ld but " - "found %d %Ld\n", dev, tmp, ce->dev, + beos_panic("*** error4: looked up dev %d block %lld but " + "found %d %lld\n", dev, tmp, ce->dev, ce->block_num); } @@ -1858,8 +1858,8 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz if (ce) { if (tmp != ce->block_num || dev != ce->dev) { UNLOCK(bc.lock); - beos_panic("*** error5: looked up dev %d block %Ld but " - "found %d %Ld\n", dev, tmp, ce->dev, + beos_panic("*** error5: looked up dev %d block %lld but " + "found %d %lld\n", dev, tmp, ce->dev, ce->block_num); return EBADF; } diff --git a/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp b/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp index 924462df0e..27718cc244 100644 --- a/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp +++ b/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp @@ -185,7 +185,7 @@ amiga_rdb_scan_partition(int fd, partition_data *partition, void *_cookie) if (environment.Start() + environment.Size() > (uint64)partition->size) { - TRACE(("amiga_rdb: child partition exceeds existing space (%Ld " + TRACE(("amiga_rdb: child partition exceeds existing space (%lld " "bytes)\n", environment.Size())); continue; } diff --git a/src/add-ons/kernel/partitioning_systems/apple/apple.cpp b/src/add-ons/kernel/partitioning_systems/apple/apple.cpp index 850a59b3ac..cdf30cbcec 100644 --- a/src/add-ons/kernel/partitioning_systems/apple/apple.cpp +++ b/src/add-ons/kernel/partitioning_systems/apple/apple.cpp @@ -163,7 +163,7 @@ apple_scan_partition(int fd, partition_data *partition, void *_cookie) partitionMap.name, partitionMap.type)); if (partitionMap.Start(descriptor) + partitionMap.Size(descriptor) > (uint64)partition->size) { - TRACE(("apple: child partition exceeds existing space (%Ld bytes)\n", + TRACE(("apple: child partition exceeds existing space (%lld bytes)\n", partitionMap.Size(descriptor))); continue; } diff --git a/src/add-ons/kernel/partitioning_systems/atari/atari.cpp b/src/add-ons/kernel/partitioning_systems/atari/atari.cpp index eaa7b5f8e8..c622174f2b 100644 --- a/src/add-ons/kernel/partitioning_systems/atari/atari.cpp +++ b/src/add-ons/kernel/partitioning_systems/atari/atari.cpp @@ -173,7 +173,7 @@ atari_scan_partition(int fd, partition_data *partition, void *_cookie) continue; TRACE(("atari: file system: %.3s\n", p->id)); if ((p->Start() + p->Size())*(uint64)SECTSZ > (uint64)partition->size) { - TRACE(("atari: child partition exceeds existing space (%Ld bytes)\n", p->Size()*SECTSZ)); + TRACE(("atari: child partition exceeds existing space (%lld bytes)\n", p->Size()*SECTSZ)); continue; } if (!isalnum(p->id[0])) diff --git a/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp b/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp index 98b640ccb0..0e67b2ddea 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp +++ b/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp @@ -298,7 +298,7 @@ PartitionMapParser::_ReadPartitionTable(off_t offset, partition_table* table) // check the offset if (offset < 0 || offset + toRead > fSessionSize) { - TRACE(("intel: _ReadPartitionTable(): bad offset: %Ld\n", offset)); + TRACE(("intel: _ReadPartitionTable(): bad offset: %lld\n", offset)); return B_BAD_VALUE; } diff --git a/src/add-ons/media/media-add-ons/dvb/DVBCard.cpp b/src/add-ons/media/media-add-ons/dvb/DVBCard.cpp index 5e86489d2a..311438ad3c 100644 --- a/src/add-ons/media/media-add-ons/dvb/DVBCard.cpp +++ b/src/add-ons/media/media-add-ons/dvb/DVBCard.cpp @@ -129,7 +129,7 @@ DVBCard::SetTuningParameter(const dvb_tuning_parameters_t& param) printf("DVBCard::SetTuningParameter:\n"); /* - printf("frequency %Ld\n", param.frequency); + printf("frequency %lld\n", param.frequency); printf("inversion %d\n", param.inversion); printf("bandwidth %d\n", param.bandwidth); printf("modulation %d\n", param.modulation); diff --git a/src/add-ons/media/media-add-ons/dvb/DVBMediaNode.cpp b/src/add-ons/media/media-add-ons/dvb/DVBMediaNode.cpp index 1da2a4cccf..48476b497d 100644 --- a/src/add-ons/media/media-add-ons/dvb/DVBMediaNode.cpp +++ b/src/add-ons/media/media-add-ons/dvb/DVBMediaNode.cpp @@ -274,7 +274,7 @@ DVBMediaNode::SetTimeSource(BTimeSource *time_source) { TRACE("DVBMediaNode::SetTimeSource\n"); //printf("current RunMode = %d\n", RunMode()); - //printf("_m_recordDelay = %Ld\n", _m_recordDelay); + //printf("_m_recordDelay = %lld\n", _m_recordDelay); } @@ -283,7 +283,7 @@ DVBMediaNode::SetRunMode(run_mode mode) { TRACE("DVBMediaNode::SetRunMode: %d\n", mode); TRACE("current RunMode = %d\n", RunMode()); - //printf("_m_recordDelay = %Ld\n", _m_recordDelay); + //printf("_m_recordDelay = %lld\n", _m_recordDelay); } @@ -346,7 +346,7 @@ DVBMediaNode::NodeRegistered() // SetRunMode(B_RECORDING); //printf("RunMode = %d\n", RunMode()); - //printf("_m_recordDelay = %Ld\n", _m_recordDelay); + //printf("_m_recordDelay = %lld\n", _m_recordDelay); Run(); } @@ -457,7 +457,7 @@ DVBMediaNode::GetLatency(bigtime_t *out_latency) if (B_OK != BBufferProducer::GetLatency(out_latency)) *out_latency = 50000; - printf("DVBMediaNode::GetLatency: %Ld\n", *out_latency); + printf("DVBMediaNode::GetLatency: %lld\n", *out_latency); *out_latency += PROCESSING_LATENCY; return B_OK; } @@ -845,7 +845,7 @@ DVBMediaNode::Connect(status_t error, const media_source &source, if (B_OK != FindLatencyFor(destination, &latency, &ts)) TRACE("FindLatencyFor failed\n"); else - TRACE("downstream latency %Ld\n", latency); + TRACE("downstream latency %lld\n", latency); #endif } @@ -891,7 +891,7 @@ void DVBMediaNode::LateNoticeReceived(const media_source &source, bigtime_t how_much, bigtime_t performance_time) { - TRACE("DVBMediaNode::LateNoticeReceived %Ld late at %Ld\n", how_much, + TRACE("DVBMediaNode::LateNoticeReceived %lld late at %lld\n", how_much, performance_time); } @@ -938,7 +938,7 @@ DVBMediaNode::LatencyChanged(const media_source &source, const media_destination &destination, bigtime_t new_latency, uint32 flags) { - TRACE("DVBMediaNode::LatencyChanged to %Ld\n", new_latency); + TRACE("DVBMediaNode::LatencyChanged to %lld\n", new_latency); } /* DVBMediaNode */ @@ -947,14 +947,14 @@ DVBMediaNode::LatencyChanged(const media_source &source, void DVBMediaNode::HandleTimeWarp(bigtime_t performance_time) { - TRACE("DVBMediaNode::HandleTimeWarp at %Ld\n", performance_time); + TRACE("DVBMediaNode::HandleTimeWarp at %lld\n", performance_time); } void DVBMediaNode::HandleSeek(bigtime_t performance_time) { - TRACE("DVBMediaNode::HandleSeek at %Ld\n", performance_time); + TRACE("DVBMediaNode::HandleSeek at %lld\n", performance_time); } @@ -1773,24 +1773,24 @@ DVBMediaNode::raw_audio_thread() bigtime_t delay; delay = start_time - TimeSource()->Now(); - TRACE_TIMING("audio delay is %Ld\n", delay); + TRACE_TIMING("audio delay is %lld\n", delay); if (delay < -AUDIO_MAX_LATE) { - printf("audio: decoded packet is %Ldms too late, dropped\n", + printf("audio: decoded packet is %lldms too late, dropped\n", -delay / 1000); buf->Recycle(); continue; } if (delay < 0) -// printf("audio: decoded packet is %Ldms too late\n", -delay / 1000); +// printf("audio: decoded packet is %lldms too late\n", -delay / 1000); if (delay > AUDIO_MAX_EARLY) { - printf("audio: decoded packet is %Ldms too early, dropped\n", + printf("audio: decoded packet is %lldms too early, dropped\n", delay / 1000); buf->Recycle(); continue; } if (delay > 0) -// printf("audio: decoded packet is %Ldms too early\n", delay / 1000); +// printf("audio: decoded packet is %lldms too early\n", delay / 1000); delay -= PROCESSING_LATENCY; if (delay > 0) { @@ -1802,7 +1802,7 @@ DVBMediaNode::raw_audio_thread() } } - TRACE_TIMING("audio playback delay %Ld\n", + TRACE_TIMING("audio playback delay %lld\n", start_time - TimeSource()->Now()); media_header* hdr; @@ -1993,15 +1993,15 @@ DVBMediaNode::raw_video_thread() bigtime_t delay; delay = start_time - TimeSource()->Now(); - TRACE_TIMING("video delay %Ld\n", delay); + TRACE_TIMING("video delay %lld\n", delay); if (delay < -VIDEO_MAX_LATE) { - printf("video: decoded packet is %Ldms too late, dropped\n", + printf("video: decoded packet is %lldms too late, dropped\n", -delay / 1000); buf->Recycle(); continue; } if (delay > VIDEO_MAX_EARLY) { - printf("video: decoded packet is %Ldms too early, dropped\n", + printf("video: decoded packet is %lldms too early, dropped\n", delay / 1000); buf->Recycle(); continue; @@ -2016,7 +2016,7 @@ DVBMediaNode::raw_video_thread() } } - TRACE_TIMING("video playback delay %Ld\n", start_time + TRACE_TIMING("video playback delay %lld\n", start_time - TimeSource()->Now()); media_header* hdr; @@ -2103,7 +2103,7 @@ DVBMediaNode::GetNextAudioChunk(const void **chunkData, size_t *chunkLen, // measured in PCR time base mh->start_time = fCurrentAudioPacket->TimeStamp(); -// printf("GetNextAudioChunk: done start_time %Ld\n", mh->start_time); +// printf("GetNextAudioChunk: done start_time %lld\n", mh->start_time); return B_OK; } @@ -2990,7 +2990,7 @@ DVBMediaNode::ExtractTuningParams(const char *description, int audio_pid_index, TRACE("parsing result: audio pid %d\n", _apid); TRACE("parsing result: PCR pid %d\n", _cpid); TRACE("parsing result: symbol rate %d\n", _srate); - TRACE("parsing result: Frequency %Ld Hz, %Ld MHz\n", _freq, _freq / 1000000); + TRACE("parsing result: Frequency %lld Hz, %lld MHz\n", _freq, _freq / 1000000); if (fInterfaceType == DVB_TYPE_DVB_T) { diff --git a/src/add-ons/media/media-add-ons/dvb/TransportStreamDemux.cpp b/src/add-ons/media/media-add-ons/dvb/TransportStreamDemux.cpp index d2c99a90d0..28016480f0 100644 --- a/src/add-ons/media/media-add-ons/dvb/TransportStreamDemux.cpp +++ b/src/add-ons/media/media-add-ons/dvb/TransportStreamDemux.cpp @@ -92,11 +92,11 @@ TransportStreamDemux::ProcessPacket(const mpeg_ts_packet *pkt, bigtime_t start_t { fCount++; -// printf("ProcessPacket %Ld\n", fCount); +// printf("ProcessPacket %lld\n", fCount); if (pkt->SyncByte() != 0x47) { // fCountInvalid++; - printf("packet %Ld sync byte error " + printf("packet %lld sync byte error " "%02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x %02x %02x\n", fCount, pkt->header[0], pkt->header[1], pkt->header[2], pkt->header[3], @@ -108,7 +108,7 @@ TransportStreamDemux::ProcessPacket(const mpeg_ts_packet *pkt, bigtime_t start_t // if (pkt->TransportError()) { // fCountInvalid++; -// printf("invalid packet %Ld (transport_error_indicator)\n", fCount); +// printf("invalid packet %lld (transport_error_indicator)\n", fCount); // return; // } @@ -156,10 +156,10 @@ TransportStreamDemux::ProcessPCR(const mpeg_ts_packet *pkt, bigtime_t start_time | (pkt->data[6] >> 7); pcr *= 300; pcr += (pkt->data[6] & 1) | pkt->data[7]; -// printf(" pcr = %Ld\n", pcr); +// printf(" pcr = %lld\n", pcr); // bigtime_t now = system_time(); -// printf("system_time %.3f, PCR-time %.3f, delta %.06f, PCR %Ld\n", now / 1e6, CLOCK_TO_USEC(pcr) / 1e6, (CLOCK_TO_USEC(pcr) - now) / 1e6, pcr); +// printf("system_time %.3f, PCR-time %.3f, delta %.06f, PCR %lld\n", now / 1e6, CLOCK_TO_USEC(pcr) / 1e6, (CLOCK_TO_USEC(pcr) - now) / 1e6, pcr); // atomic_set64(&fCurrentTime, CLOCK_TO_USEC(pcr)); @@ -247,7 +247,7 @@ TransportStreamDemux::ProcessAUD(const mpeg_ts_packet *pkt) | (data[12] << 7) | (data[13] >> 1); pts *= 300; -// printf("vid pts = %Ld\n", pts); +// printf("vid pts = %lld\n", pts); if (data[7] & 0x40) { // DTS @@ -256,7 +256,7 @@ TransportStreamDemux::ProcessAUD(const mpeg_ts_packet *pkt) | (data[17] << 7) | (data[18] >> 1); dts *= 300; -// printf("aud dts = %Ld\n", dts); +// printf("aud dts = %lld\n", dts); } else { dts = pts; } @@ -358,7 +358,7 @@ TransportStreamDemux::ProcessVID(const mpeg_ts_packet *pkt) | (data[12] << 7) | (data[13] >> 1); pts *= 300; -// printf("vid pts = %Ld\n", pts); +// printf("vid pts = %lld\n", pts); if (data[7] & 0x40) { // DTS @@ -367,8 +367,8 @@ TransportStreamDemux::ProcessVID(const mpeg_ts_packet *pkt) | (data[17] << 7) | (data[18] >> 1); dts *= 300; -// printf("vid dts = %Ld\n", dts); -// printf("dts = %Ld, pts = %Ld, delta %Ld ### dts = %Ld, pts = %Ld, delta %Ld\n", +// printf("vid dts = %lld\n", dts); +// printf("dts = %lld, pts = %lld, delta %lld ### dts = %lld, pts = %lld, delta %lld\n", // dts, pts, pts - dts, CLOCK_TO_USEC(dts), CLOCK_TO_USEC(pts), CLOCK_TO_USEC(pts - dts)); } else { dts = pts; diff --git a/src/add-ons/media/media-add-ons/esound_sink/ESDEndpoint.cpp b/src/add-ons/media/media-add-ons/esound_sink/ESDEndpoint.cpp index 85453e1d38..a412ef8d6c 100644 --- a/src/add-ons/media/media-add-ons/esound_sink/ESDEndpoint.cpp +++ b/src/add-ons/media/media-add-ons/esound_sink/ESDEndpoint.cpp @@ -272,7 +272,7 @@ ESDEndpoint::ConnectThread(void) bigtime_t serverLatency = result * 1000000LL / (ESD_DEFAULT_RATE * 2/*16b*/ * 2/*stereo*/ ); bigtime_t netLatency = (fLatency + ping) / 2; /* mean of both */ - fprintf(stderr, "ESDEndpoint::Connect: Latency: server: %Ld, net1: %Ld, net2: %Ld\n", serverLatency, fLatency, ping); + fprintf(stderr, "ESDEndpoint::Connect: Latency: server: %lld, net1: %lld, net2: %lld\n", serverLatency, fLatency, ping); fLatency = netLatency + serverLatency; diff --git a/src/add-ons/media/media-add-ons/esound_sink/ESDSinkNode.cpp b/src/add-ons/media/media-add-ons/esound_sink/ESDSinkNode.cpp index 9cef0a5d8d..70764d42dd 100644 --- a/src/add-ons/media/media-add-ons/esound_sink/ESDSinkNode.cpp +++ b/src/add-ons/media/media-add-ons/esound_sink/ESDSinkNode.cpp @@ -417,7 +417,7 @@ status_t ESDSinkNode::GetLatencyFor( if (netl > 500000) netl = 500000; *out_latency = intl + netl; - fprintf(stderr, "int latency %Ld, net latency %Ld, total latency %Ld\n", intl, netl, *out_latency); + fprintf(stderr, "int latency %lld, net latency %lld, total latency %lld\n", intl, netl, *out_latency); *out_timesource = TimeSource()->ID(); return B_OK; } @@ -750,10 +750,10 @@ ESDSinkNode::Connect(status_t error, const media_source& source, const media_des // Do so, then make sure we get our events early enough. media_node_id id; FindLatencyFor(channel->fOutput.destination, &fLatency, &id); - PRINT(("\tdownstream latency = %Ld\n", fLatency)); + PRINT(("\tdownstream latency = %lld\n", fLatency)); fInternalLatency = BufferDuration(); - PRINT(("\tbuffer-filling took %Ld usec on this machine\n", fInternalLatency)); + PRINT(("\tbuffer-filling took %lld usec on this machine\n", fInternalLatency)); //SetEventLatency(fLatency + fInternalLatency); // Set up the buffer group for our connection, as long as nobody handed us a @@ -828,7 +828,7 @@ ESDSinkNode::LateNoticeReceived(const media_source& what, bigtime_t how_much, bi fInternalLatency += how_much; SetEventLatency(fLatency + fInternalLatency); - fprintf(stderr, "\tincreasing latency to %Ld\n", fLatency + fInternalLatency); + fprintf(stderr, "\tincreasing latency to %lld\n", fLatency + fInternalLatency); } else { diff --git a/src/add-ons/media/media-add-ons/finepix_webcam/FinePixProducer/Producer.cpp b/src/add-ons/media/media-add-ons/finepix_webcam/FinePixProducer/Producer.cpp index 9a2643ba3b..5b6641fbf2 100644 --- a/src/add-ons/media/media-add-ons/finepix_webcam/FinePixProducer/Producer.cpp +++ b/src/add-ons/media/media-add-ons/finepix_webcam/FinePixProducer/Producer.cpp @@ -595,7 +595,7 @@ FinePixProducer::HandleStart(bigtime_t performance_time) { /* Start producing frames, even if the output hasn't been connected yet. */ - PRINTF(1, ("HandleStart(%Ld)\n", performance_time)); + PRINTF(1, ("HandleStart(%lld)\n", performance_time)); if (fRunning) { PRINTF(-1, ("HandleStart: Node already started\n")); diff --git a/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp b/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp index 833d9fdcc4..f84946f50f 100644 --- a/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp +++ b/src/add-ons/media/media-add-ons/firewire_dv/FireWireDVNode.cpp @@ -406,7 +406,7 @@ FireWireDVNode::Connect(status_t error, const media_source& source, if (B_OK != FindLatencyFor(destination, &latency, &ts)) TRACE("FindLatencyFor failed\n"); else - TRACE("downstream latency %Ld\n", latency); + TRACE("downstream latency %lld\n", latency); #endif } @@ -427,7 +427,7 @@ void FireWireDVNode::LateNoticeReceived(const media_source& source, bigtime_t how_much, bigtime_t performance_time) { - TRACE("FireWireDVNode::LateNoticeReceived %Ld late at %Ld\n", how_much, performance_time); + TRACE("FireWireDVNode::LateNoticeReceived %lld late at %lld\n", how_much, performance_time); } @@ -455,14 +455,14 @@ FireWireDVNode::AdditionalBufferRequested(const media_source& source, void FireWireDVNode::HandleTimeWarp(bigtime_t performance_time) { - TRACE("FireWireDVNode::HandleTimeWarp at %Ld\n", performance_time); + TRACE("FireWireDVNode::HandleTimeWarp at %lld\n", performance_time); } void FireWireDVNode::HandleSeek(bigtime_t performance_time) { - TRACE("FireWireDVNode::HandleSeek at %Ld\n", performance_time); + TRACE("FireWireDVNode::HandleSeek at %lld\n", performance_time); } diff --git a/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp b/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp index a074206fcf..c98e98f436 100644 --- a/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp +++ b/src/add-ons/media/media-add-ons/mixer/AudioMixer.cpp @@ -728,7 +728,7 @@ AudioMixer::GetLatency(bigtime_t *out_latency) // report our *total* latency: internal plus downstream plus scheduling *out_latency = EventLatency() + SchedulingLatency(); - TRACE("AudioMixer::GetLatency %Ld\n", *out_latency); + TRACE("AudioMixer::GetLatency %lld\n", *out_latency); return B_OK; } @@ -745,7 +745,7 @@ AudioMixer::LatencyChanged(const media_source& source, } TRACE("AudioMixer::LatencyChanged: downstream latency from %ld/%ld to " - "%ld/%ld changed from %Ld to %Ld\n", source.port, source.id, + "%ld/%ld changed from %lld to %lld\n", source.port, source.id, destination.port, destination.id, fDownstreamLatency, new_latency); #if DEBUG @@ -753,7 +753,7 @@ AudioMixer::LatencyChanged(const media_source& source, media_node_id id; bigtime_t l; FindLatencyFor(destination, &l, &id); - TRACE("AudioMixer: Reported downstream Latency is %Ld usecs\n", l); + TRACE("AudioMixer: Reported downstream Latency is %lld usecs\n", l); } #endif @@ -917,17 +917,17 @@ AudioMixer::Connect(status_t error, const media_source &source, // Now that we're connected, we can determine our downstream latency. media_node_id id; FindLatencyFor(dest, &fDownstreamLatency, &id); - TRACE("AudioMixer: Downstream Latency is %Ld usecs\n", fDownstreamLatency); + TRACE("AudioMixer: Downstream Latency is %lld usecs\n", fDownstreamLatency); // SetDuration of one buffer SetBufferDuration(buffer_duration(format.u.raw_audio)); - TRACE("AudioMixer: buffer duration is %Ld usecs\n", BufferDuration()); + TRACE("AudioMixer: buffer duration is %lld usecs\n", BufferDuration()); // Our internal latency is at least the length of a full output buffer // plus mixing time, plus jitter fInternalLatency = BufferDuration() + max(kMinMixingTime, bigtime_t(0.5 * BufferDuration())) + kMaxJitter; - TRACE("AudioMixer: Internal latency is %Ld usecs\n", fInternalLatency); + TRACE("AudioMixer: Internal latency is %lld usecs\n", fInternalLatency); SetEventLatency(fDownstreamLatency + fInternalLatency); @@ -1014,7 +1014,7 @@ AudioMixer::LateNoticeReceived(const media_source& what, bigtime_t howMuch, // is the only runmode in which we can do anything about this // TODO: quality could be decreased, too - ERROR("AudioMixer::LateNoticeReceived, %Ld too late at %Ld\n", howMuch, + ERROR("AudioMixer::LateNoticeReceived, %lld too late at %lld\n", howMuch, performanceTime); if (what == fCore->Output()->MediaOutput().source @@ -1147,7 +1147,7 @@ AudioMixer::PublishEventLatencyChange() MixerInput *input; for (int i = 0; (input = fCore->Input(i)) != 0; i++) { TRACE("AudioMixer::PublishEventLatencyChange: SendLatencyChange, " - "connection %ld/%ld to %ld/%ld event latency is now %Ld\n", + "connection %ld/%ld to %ld/%ld event latency is now %lld\n", input->MediaInput().source.port, input->MediaInput().source.id, input->MediaInput().destination.port, input->MediaInput().destination.id, EventLatency()); @@ -1166,8 +1166,8 @@ AudioMixer::CreateBufferGroup(BBufferGroup** buffer) const // (plus one for rounding up), plus one extra int32 count = int32(fDownstreamLatency / BufferDuration()) + 2; - TRACE("AudioMixer::CreateBufferGroup: fDownstreamLatency %Ld, " - "BufferDuration %Ld, buffer count = %ld\n", fDownstreamLatency, + TRACE("AudioMixer::CreateBufferGroup: fDownstreamLatency %lld, " + "BufferDuration %lld, buffer count = %ld\n", fDownstreamLatency, BufferDuration(), count); if (count < 3) diff --git a/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp index 6e1632cf56..a1924c8dde 100644 --- a/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp +++ b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp @@ -295,7 +295,7 @@ MixerCore::SetTimingInfo(BTimeSource *ts, bigtime_t downstream_latency) fTimeSource = dynamic_cast(ts->Acquire()); fDownstreamLatency = downstream_latency; - TRACE("MixerCore::SetTimingInfo, now = %Ld, downstream latency %Ld\n", + TRACE("MixerCore::SetTimingInfo, now = %lld, downstream latency %lld\n", fTimeSource->Now(), fDownstreamLatency); } @@ -484,7 +484,7 @@ MixerCore::_MixThread() bigtime_t start = fTimeSource->Now(); Unlock(); while (start <= 0) { - TRACE("MixerCore: delaying _MixThread start, timesource is at %Ld\n", + TRACE("MixerCore: delaying _MixThread start, timesource is at %lld\n", start); snooze(5000); if (!Lock()) @@ -500,8 +500,8 @@ MixerCore::_MixThread() bigtime_t bufferRequestTimeout = buffer_duration( fOutput->MediaOutput().format.u.raw_audio) / 2; - TRACE("MixerCore: starting _MixThread at %Ld with latency %Ld and " - "downstream latency %Ld, bufferRequestTimeout %Ld\n", start, + TRACE("MixerCore: starting _MixThread at %lld with latency %lld and " + "downstream latency %lld, bufferRequestTimeout %lld\n", start, fEventLatency, fDownstreamLatency, bufferRequestTimeout); // We must read from the input buffer at a position (pos) that is always @@ -511,8 +511,8 @@ MixerCore::_MixThread() * fMixBufferFrameCount; bigtime_t timeBase = duration_for_frames(fMixBufferFrameRate, frameBase); - TRACE("MixerCore: starting _MixThread, start %Ld, timeBase %Ld, " - "frameBase %Ld\n", start, timeBase, frameBase); + TRACE("MixerCore: starting _MixThread, start %lld, timeBase %lld, " + "frameBase %lld\n", start, timeBase, frameBase); ASSERT(fMixBufferFrameCount > 0); @@ -570,7 +570,7 @@ MixerCore::_MixThread() hdr->start_time = fEventTime; if (fNode->SendBuffer(buffer, fOutput) != B_OK) { #if DEBUG - ERROR("MixerCore: SendBuffer failed for buffer %Ld\n", + ERROR("MixerCore: SendBuffer failed for buffer %lld\n", bufferIndex); #else ERROR("MixerCore: SendBuffer failed\n"); @@ -579,7 +579,7 @@ MixerCore::_MixThread() } } else { #if DEBUG - ERROR("MixerCore: RequestBuffer failed for buffer %Ld\n", + ERROR("MixerCore: RequestBuffer failed for buffer %lld\n", bufferIndex); #else ERROR("MixerCore: RequestBuffer failed\n"); @@ -594,8 +594,8 @@ MixerCore::_MixThread() // mix all data from all inputs into the mix buffer ASSERT(currentFramePos % fMixBufferFrameCount == 0); - PRINT(4, "create new buffer event at %Ld, reading input frames at " - "%Ld\n", fEventTime, currentFramePos); + PRINT(4, "create new buffer event at %lld, reading input frames at " + "%lld\n", fEventTime, currentFramePos); // Init the channel information for each MixerInput. for (int i = 0; MixerInput* input = Input(i); i++) { @@ -706,7 +706,7 @@ MixerCore::_MixThread() status_t res = fNode->SendBuffer(buffer, fOutput); if (res != B_OK) { #if DEBUG - ERROR("MixerCore: SendBuffer failed for buffer %Ld\n", + ERROR("MixerCore: SendBuffer failed for buffer %lld\n", bufferIndex); #else ERROR("MixerCore: SendBuffer failed\n"); @@ -715,7 +715,7 @@ MixerCore::_MixThread() } } else { #if DEBUG - ERROR("MixerCore: RequestBuffer failed for buffer %Ld\n", + ERROR("MixerCore: RequestBuffer failed for buffer %lld\n", bufferIndex); #else ERROR("MixerCore: RequestBuffer failed\n"); diff --git a/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp b/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp index 420a2d728b..57f2c7ad02 100644 --- a/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp +++ b/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp @@ -138,7 +138,7 @@ MixerInput::BufferReceived(BBuffer* buffer) size / bytes_per_frame(fInput.format.u.raw_audio)); if (start < 0) { ERROR("MixerInput::BufferReceived: buffer with negative start time of " - "%Ld dropped\n", start); + "%lld dropped\n", start); return; } diff --git a/src/add-ons/media/media-add-ons/mixer/MixerInput.h b/src/add-ons/media/media-add-ons/mixer/MixerInput.h index 361ca1efe1..c9c1fe080d 100644 --- a/src/add-ons/media/media-add-ons/mixer/MixerInput.h +++ b/src/add-ons/media/media-add-ons/mixer/MixerInput.h @@ -140,8 +140,8 @@ MixerInput::GetMixerChannelInfo(int mixerChannel, int64 framepos, fDebugMixBufferFrames)) >= fLastDataAvailableTime) { // Print this error for the first channel only. if (mixerChannel == 0) { - ERROR("MixerInput::GetMixerChannelInfo: reading wrong data, have %Ld " - "to %Ld, reading from %Ld to %Ld\n", + ERROR("MixerInput::GetMixerChannelInfo: reading wrong data, have %lld " + "to %lld, reading from %lld to %lld\n", fLastDataAvailableTime - duration_for_frames(fMixBufferFrameRate, fMixBufferFrameCount), fLastDataAvailableTime, time, time + duration_for_frames(fMixBufferFrameRate, diff --git a/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp b/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp index 844cbe49fa..70fceb1326 100644 --- a/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp +++ b/src/add-ons/media/media-add-ons/multi_audio/MultiAudioNode.cpp @@ -1194,7 +1194,7 @@ MultiAudioNode::_HandleBuffer(const media_timed_event* event, else channel->fBuffer = buffer; } else { - //PRINT(("MultiAudioNode::HandleBuffer writing channelId: %li, how_early:%Ld\n", channel->fChannelId, howEarly)); + //PRINT(("MultiAudioNode::HandleBuffer writing channelId: %li, how_early:%lld\n", channel->fChannelId, howEarly)); channel->fBuffer = buffer; } } @@ -1799,8 +1799,8 @@ MultiAudioNode::_OutputThread() fDevice->BufferExchange(&bufferInfo); //PRINT(("MultiAudioNode::RunThread: buffer exchanged\n")); - //PRINT(("MultiAudioNode::RunThread: played_real_time: %Ld\n", bufferInfo.played_real_time)); - //PRINT(("MultiAudioNode::RunThread: played_frames_count: %Ld\n", bufferInfo.played_frames_count)); + //PRINT(("MultiAudioNode::RunThread: played_real_time: %lld\n", bufferInfo.played_real_time)); + //PRINT(("MultiAudioNode::RunThread: played_frames_count: %lld\n", bufferInfo.played_frames_count)); //PRINT(("MultiAudioNode::RunThread: buffer_cycle: %li\n", bufferInfo.playback_buffer_cycle)); for (int32 i = 0; i < fInputs.CountItems(); i++) { diff --git a/src/add-ons/media/media-add-ons/opensound/OpenSoundDeviceEngine.cpp b/src/add-ons/media/media-add-ons/opensound/OpenSoundDeviceEngine.cpp index cf74f4629d..476b1108e4 100644 --- a/src/add-ons/media/media-add-ons/opensound/OpenSoundDeviceEngine.cpp +++ b/src/add-ons/media/media-add-ons/opensound/OpenSoundDeviceEngine.cpp @@ -176,7 +176,7 @@ OpenSoundDeviceEngine::PlaybackLatency() cardLatency = latency / 3; } latency += cardLatency; -// PRINT(("PlaybackLatency: odelay %d latency %Ld card %Ld\n", +// PRINT(("PlaybackLatency: odelay %d latency %lld card %lld\n", // fDriverBufferSize, latency, CardLatency())); return latency; } @@ -327,7 +327,7 @@ OpenSoundDeviceEngine::GetCurrentIPtr(int32 *fifoed, oss_count_t *info) * (fMediaFormat.AudioFormat() & media_raw_audio_format::B_AUDIO_SIZE_MASK)); info->fifo_samples = 0; } - PRINT(("OpenSoundDeviceEngine::%s: IPTR: { samples=%Ld, fifo_samples=%d }\n", __FUNCTION__, info->samples, info->fifo_samples)); + PRINT(("OpenSoundDeviceEngine::%s: IPTR: { samples=%lld, fifo_samples=%d }\n", __FUNCTION__, info->samples, info->fifo_samples)); if (fifoed) *fifoed = info->fifo_samples; return info->samples; @@ -365,7 +365,7 @@ OpenSoundDeviceEngine::GetCurrentOPtr(int32* fifoed, size_t* fragmentPos) *fragmentPos = cinfo.ptr; } -// PRINT(("OpenSoundDeviceEngine::%s: OPTR: { samples=%Ld, " +// PRINT(("OpenSoundDeviceEngine::%s: OPTR: { samples=%lld, " // "fifo_samples=%d }\n", __FUNCTION__, info->samples, // info->fifo_samples)); if (fifoed != NULL) diff --git a/src/add-ons/media/media-add-ons/opensound/OpenSoundNode.cpp b/src/add-ons/media/media-add-ons/opensound/OpenSoundNode.cpp index 5d5864908d..50281363e1 100644 --- a/src/add-ons/media/media-add-ons/opensound/OpenSoundNode.cpp +++ b/src/add-ons/media/media-add-ons/opensound/OpenSoundNode.cpp @@ -1233,10 +1233,10 @@ OpenSoundNode::Connect(status_t error, const media_source& source, // Do so, then make sure we get our events early enough. media_node_id id; FindLatencyFor(channel->fOutput.destination, &fLatency, &id); - TRACE("\tdownstream latency = %Ld\n", fLatency); + TRACE("\tdownstream latency = %lld\n", fLatency); fInternalLatency = BufferDuration(); - TRACE("\tbuffer-filling took %Ld usec on this machine\n", + TRACE("\tbuffer-filling took %lld usec on this machine\n", fInternalLatency); //SetEventLatency(fLatency + fInternalLatency); diff --git a/src/add-ons/media/media-add-ons/usb_vision/Producer.cpp b/src/add-ons/media/media-add-ons/usb_vision/Producer.cpp index 5582de3f18..539e6941b4 100644 --- a/src/add-ons/media/media-add-ons/usb_vision/Producer.cpp +++ b/src/add-ons/media/media-add-ons/usb_vision/Producer.cpp @@ -950,7 +950,7 @@ VideoProducer::HandleStart(bigtime_t performance_time) { /* Start producing frames, even if the output hasn't been connected yet. */ - PRINTF(1, ("HandleStart(%Ld)\n", performance_time)); + PRINTF(1, ("HandleStart(%lld)\n", performance_time)); if (fRunning) { PRINTF(-1, ("HandleStart: Node already started\n")); diff --git a/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp b/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp index 6e51e7a9f0..f031a0ce74 100644 --- a/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp +++ b/src/add-ons/media/media-add-ons/usb_webcam/CamStreamingDeframer.cpp @@ -108,7 +108,7 @@ CamStreamingDeframer::Write(const void *buffer, size_t size) k = 0; while ((j = FindEOF(buf + k, bufsize - k, &which)) > -1) { k += j; - //PRINT((CH "| EOF[%d] at offset %d; pos %Ld" CT, which, k, fCurrentFrame->Position())); + //PRINT((CH "| EOF[%d] at offset %d; pos %lld" CT, which, k, fCurrentFrame->Position())); if (fCurrentFrame->Position()+k >= fMinFrameSize) { i = k; break; diff --git a/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp b/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp index b0a661a746..d6493c6476 100644 --- a/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp +++ b/src/add-ons/media/media-add-ons/usb_webcam/Producer.cpp @@ -1006,7 +1006,7 @@ VideoProducer::FrameGenerator() fStats[0].actual++;; fStats[0].stamp = system_time(); - //PRINTF(1, ("FrameGenerator: stamp %Ld vs %Ld\n", stamp, h->start_time)); + //PRINTF(1, ("FrameGenerator: stamp %lld vs %lld\n", stamp, h->start_time)); //XXX: that's what we should be doing, but CodyCam drops all frames as they are late. (maybe add latency ??) //h->start_time = TimeSource()->PerformanceTimeFor(stamp); h->start_time = TimeSource()->PerformanceTimeFor(system_time()); diff --git a/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp b/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp index 203144fe1a..b00e34c1ee 100644 --- a/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp +++ b/src/add-ons/media/media-add-ons/videowindow/VideoNode.cpp @@ -340,7 +340,7 @@ VideoNode::HandleBuffer(BBuffer *buffer) } else { memcpy(fBitmap->Bits(), buffer->Data(), fBitmap->BitsLength()); } -// printf("overlay copy: %Ld usec\n", system_time() - start); +// printf("overlay copy: %lld usec\n", system_time() - start); } UnlockBitmap(); diff --git a/src/add-ons/media/plugins/ape_reader/APEReader.cpp b/src/add-ons/media/plugins/ape_reader/APEReader.cpp index 5d3e214e40..df0c187ddf 100644 --- a/src/add-ons/media/plugins/ape_reader/APEReader.cpp +++ b/src/add-ons/media/plugins/ape_reader/APEReader.cpp @@ -167,11 +167,11 @@ TAPEReader::FindKeyFrame(void* cookie, uint32 flags, int64* frame, if (flags & B_MEDIA_SEEK_TO_FRAME) { *time = *frame * 1000 / mDecomp->GetInfo(APE_DECOMPRESS_TOTAL_BLOCKS) * mDecomp->GetInfo(APE_DECOMPRESS_LENGTH_MS); - printf("FindKeyFrame for frame %Ld: %Ld\n", *frame, *time); + printf("FindKeyFrame for frame %lld: %lld\n", *frame, *time); } else if (flags & B_MEDIA_SEEK_TO_TIME) { *frame = (*time) / 1000 * mDecomp->GetInfo(APE_DECOMPRESS_TOTAL_BLOCKS) / mDecomp->GetInfo(APE_DECOMPRESS_LENGTH_MS); - printf("FindKeyFrame for time %Ld: %Ld\n", *time, *frame); + printf("FindKeyFrame for time %lld: %lld\n", *time, *frame); } else return B_ERROR; @@ -185,10 +185,10 @@ TAPEReader::Seek(void *cookie, uint32 flags, int64 *frame, bigtime_t *time) int32 aNewBlock; if (flags & B_MEDIA_SEEK_TO_FRAME) { - printf("Seek to frame %Ld\n", *frame); + printf("Seek to frame %lld\n", *frame); aNewBlock = *frame; } else if (flags & B_MEDIA_SEEK_TO_TIME) { - printf("Seek for time %Ld\n", *time); + printf("Seek for time %lld\n", *time); aNewBlock = (*time) / 1000 * mDecomp->GetInfo(APE_DECOMPRESS_TOTAL_BLOCKS) / mDecomp->GetInfo(APE_DECOMPRESS_LENGTH_MS); } else diff --git a/src/add-ons/media/plugins/au_reader/au_reader.cpp b/src/add-ons/media/plugins/au_reader/au_reader.cpp index 8011977eb9..ec5a0fcbf5 100644 --- a/src/add-ons/media/plugins/au_reader/au_reader.cpp +++ b/src/add-ons/media/plugins/au_reader/au_reader.cpp @@ -201,10 +201,10 @@ auReader::Sniff(int32 *streamCount) fBufferSize = (BUFFER_SIZE / fBlockAlign) * fBlockAlign; fBuffer = malloc(fBufferSize); - TRACE(" fDataStart %Ld\n", fDataStart); - TRACE(" fDataSize %Ld\n", fDataSize); - TRACE(" fFrameCount %Ld\n", fFrameCount); - TRACE(" fDuration %Ld\n", fDuration); + TRACE(" fDataStart %lld\n", fDataStart); + TRACE(" fDataSize %lld\n", fDataSize); + TRACE(" fFrameCount %lld\n", fFrameCount); + TRACE(" fDuration %lld\n", fDuration); TRACE(" fChannelCount %d\n", fChannelCount); TRACE(" fFrameRate %ld\n", fFrameRate); TRACE(" fBitsPerSample %d\n", fBitsPerSample); @@ -317,14 +317,14 @@ auReader::Seek(void *cookie, else pos = (*frame * fDataSize) / fFrameCount; pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start - TRACE("auReader::Seek to frame %Ld, pos %Ld\n", *frame, pos); + TRACE("auReader::Seek to frame %lld, pos %lld\n", *frame, pos); } else if (seekTo & B_MEDIA_SEEK_TO_TIME) { if (fRaw) pos = (*time * fFrameRate * fBitsPerFrame) / (1000000LL * 8); else pos = (*time * fDataSize) / fDuration; pos = (pos / fBlockAlign) * fBlockAlign; // round down to a block start - TRACE("auReader::Seek to time %Ld, pos %Ld\n", *time, pos); + TRACE("auReader::Seek to time %lld, pos %lld\n", *time, pos); } else { return B_ERROR; } @@ -335,11 +335,11 @@ auReader::Seek(void *cookie, *frame = (pos * fFrameCount) / fDataSize; *time = (*frame * 1000000LL) / fFrameRate; - TRACE("auReader::Seek newtime %Ld\n", *time); - TRACE("auReader::Seek newframe %Ld\n", *frame); + TRACE("auReader::Seek newtime %lld\n", *time); + TRACE("auReader::Seek newframe %lld\n", *frame); if (pos < 0 || pos > fDataSize) { - TRACE("auReader::Seek invalid position %Ld\n", pos); + TRACE("auReader::Seek invalid position %lld\n", pos); return B_ERROR; } diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp index 6714aa4d9b..9609c28c86 100644 --- a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp +++ b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp @@ -141,7 +141,7 @@ AVCodecDecoder::~AVCodecDecoder() #if DO_PROFILING if (profileCounter > 0) { - printf("[%c] profile: d1 = %lld, d2 = %lld (%Ld)\n", + printf("[%c] profile: d1 = %lld, d2 = %lld (%lld)\n", fIsAudio?('a'):('v'), decodingTime / profileCounter, conversionTime / profileCounter, fFrame); } @@ -1305,7 +1305,7 @@ AVCodecDecoder::_DecodeNextVideoFrame() conversionTime += doneTime - formatConversionStart; profileCounter++; if (!(fFrame % 5)) { - printf("[v] profile: d1 = %lld, d2 = %lld (%lld) required %Ld\n", + printf("[v] profile: d1 = %lld, d2 = %lld (%lld) required %lld\n", decodingTime / profileCounter, conversionTime / profileCounter, fFrame, bigtime_t(1000000LL / fOutputFrameRate)); decodingTime = 0; diff --git a/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp b/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp index 182f93ddd9..762a21300f 100644 --- a/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp +++ b/src/add-ons/media/plugins/raw_decoder/RawDecoderPlugin.cpp @@ -515,7 +515,7 @@ RawDecoder::Decode(void *buffer, int64 *frameCount, if (fSwapOutput) fSwapOutput(buffer, *frameCount * fInputFormat.u.raw_audio.channel_count); - TRACE("framecount %Ld, time %Ld\n",*frameCount, mediaHeader->start_time); + TRACE("framecount %lld, time %lld\n",*frameCount, mediaHeader->start_time); return *frameCount ? B_OK : B_ERROR; } diff --git a/src/add-ons/translators/gif/GIFTranslator.cpp b/src/add-ons/translators/gif/GIFTranslator.cpp index 98b4b957a1..2b02b26afb 100644 --- a/src/add-ons/translators/gif/GIFTranslator.cpp +++ b/src/add-ons/translators/gif/GIFTranslator.cpp @@ -297,7 +297,7 @@ GIFTranslator::DerivedTranslate(BPositionIO* inSource, if (debug) { now = system_time() - now; - syslog(LOG_INFO, "Translate() - Translation took %Ld microseconds\n", + syslog(LOG_INFO, "Translate() - Translation took %lld microseconds\n", now); } return B_OK; diff --git a/src/apps/cortex/NodeManager/NodeGroup.cpp b/src/apps/cortex/NodeManager/NodeGroup.cpp index f623a9517b..d635a6a6bc 100644 --- a/src/apps/cortex/NodeManager/NodeGroup.cpp +++ b/src/apps/cortex/NodeManager/NodeGroup.cpp @@ -404,7 +404,7 @@ status_t NodeGroup::setStartPosition( Autolock _l(this); D_METHOD(( - "NodeGroup::setStartPosition(%Ld)\n", start)); + "NodeGroup::setStartPosition(%lld)\n", start)); if( m_transportState == TRANSPORT_RUNNING || @@ -466,7 +466,7 @@ status_t NodeGroup::setEndPosition( Autolock _l(this); D_METHOD(( - "NodeGroup::setEndPosition(%Ld)\n", end)); + "NodeGroup::setEndPosition(%lld)\n", end)); if( m_transportState == TRANSPORT_RUNNING || @@ -1121,13 +1121,13 @@ status_t NodeGroup::_preroll() { // strerror(err))); // return; // } -//// PRINT(("- %Ld\n", latency)); +//// PRINT(("- %lld\n", latency)); // // bigtime_t add; // err = BMediaRoster::Roster()->GetInitialLatencyFor( // r->node(), // &add); -//// PRINT(("- %Ld\n", add)); +//// PRINT(("- %lld\n", add)); // if(err < B_OK) { // PRINT(( // "* calcLatencyFn: GetInitialLatencyFor() failed: %s\n", @@ -1140,7 +1140,7 @@ status_t NodeGroup::_preroll() { // maxLatency = latency; // //// PRINT(( -//// "- max latency: %Ld\n", +//// "- max latency: %lld\n", //// maxLatency)); // } //}; @@ -1482,7 +1482,7 @@ void NodeGroup::_cycleInit( assert_locked(this); ASSERT(m_cycleNodes.size() > 0); D_METHOD(( - "NodeGroup::_cycleInit(%Ld)\n", + "NodeGroup::_cycleInit(%lld)\n", startTime)); // +++++ rescan latencies? diff --git a/src/apps/cortex/NodeManager/NodeRef.cpp b/src/apps/cortex/NodeManager/NodeRef.cpp index a7f7595a7b..50b2ff787f 100644 --- a/src/apps/cortex/NodeManager/NodeRef.cpp +++ b/src/apps/cortex/NodeManager/NodeRef.cpp @@ -1693,7 +1693,7 @@ status_t NodeRef::_setRunMode( assert_locked(this); D_METHOD(( - "NodeRef('%s')::_setRunMode(%ld : %Ld)\n", + "NodeRef('%s')::_setRunMode(%ld : %lld)\n", name(), runMode, delay)); status_t err; @@ -1766,7 +1766,7 @@ status_t NodeRef::_preroll( assert_locked(this); D_METHOD(( - "NodeRef('%s')::_preroll(%Ld)\n", + "NodeRef('%s')::_preroll(%lld)\n", name(), position)); status_t err; @@ -1867,7 +1867,7 @@ status_t NodeRef::_seekStopped( assert_locked(this); D_METHOD(( - "NodeRef('%s')::_seekStopped(to %Ld)\n", + "NodeRef('%s')::_seekStopped(to %lld)\n", name(), position)); if(m_running) @@ -1887,7 +1887,7 @@ status_t NodeRef::_start( assert_locked(this); D_METHOD(( - "NodeRef('%s')::_start(at %Ld)\n", + "NodeRef('%s')::_start(at %lld)\n", name(), when)); if(isRunning()) { @@ -1978,7 +1978,7 @@ status_t NodeRef::_roll( assert_locked(this); D_METHOD(( - "NodeRef('%s')::_roll(%Ld to %Ld, from %Ld)\n", + "NodeRef('%s')::_roll(%lld to %lld, from %lld)\n", name(), start, stop, position)); status_t err; @@ -2224,8 +2224,8 @@ status_t NodeRef::_schedulePositionUpdate( // //// PRINT(( //// "NodeRef::_schedulePositionUpdate():\n" -//// " when = %Ld\n" -//// " position = %Ld\n", +//// " when = %lld\n" +//// " position = %lld\n", //// when, position)); // // m_positionSyncThread->setPosition(position); diff --git a/src/apps/cortex/RouteApp/DormantNodeIO.cpp b/src/apps/cortex/RouteApp/DormantNodeIO.cpp index e210ef4cdb..93c7f48952 100644 --- a/src/apps/cortex/RouteApp/DormantNodeIO.cpp +++ b/src/apps/cortex/RouteApp/DormantNodeIO.cpp @@ -168,7 +168,7 @@ status_t DormantNodeIO::instantiate( // " kinds: %Lx\n" // " flags: %lx\n" // " runMode: %ld\n" -// " recDelay: %Ld\n" +// " recDelay: %lld\n" // " cycle: %s\n" // " entry: %s\n\n", // m_nodeKey.String(), diff --git a/src/apps/cortex/ValControl/NumericValControl.cpp b/src/apps/cortex/ValControl/NumericValControl.cpp index 08a4c64702..9cc5c1c489 100644 --- a/src/apps/cortex/ValControl/NumericValControl.cpp +++ b/src/apps/cortex/ValControl/NumericValControl.cpp @@ -232,7 +232,7 @@ NumericValControl::value() const // ASSERT(digitSegment); // // PRINT(( -// "\t...segment %d: %d digits at %d: %Ld\n", +// "\t...segment %d: %d digits at %d: %lld\n", // n-1, // digitSegment->digitCount(), // digitSegment->scaleFactor(), @@ -288,7 +288,7 @@ NumericValControl::setValue(double value, bool setParam) value = (double)fixed / scaleFactor; // PRINT(( -// " -> %.12f, %Ld\n", value, fixed)); +// " -> %.12f, %lld\n", value, fixed)); _SetValueFixed(fixed); @@ -373,7 +373,7 @@ NumericValControl::offsetSegmentValue(ValControlDigitSegment* segment, { // PRINT(( -// "### offsetSegmentValue(): %Ld\n", +// "### offsetSegmentValue(): %lld\n", // offset)); int64 segmentFactor = (int64)pow(10, fFractionalDigits + segment->scaleFactor()); @@ -566,7 +566,7 @@ NumericValControl::_ValueFixed() const { ASSERT(digitSegment); // PRINT(( -// "\t...segment %d: %d digits at %d: %Ld\n", +// "\t...segment %d: %d digits at %d: %lld\n", // n-1, // digitSegment->digitCount(), // digitSegment->scaleFactor(), @@ -576,7 +576,7 @@ NumericValControl::_ValueFixed() const { scaleBase + digitSegment->scaleFactor()); // // PRINT(( -// "\t-> %Ld\n\n", acc)); +// "\t-> %lld\n\n", acc)); } } @@ -590,7 +590,7 @@ void NumericValControl::_SetValueFixed(int64 fixed) { // PRINT(( -// "### NumericValControl::_SetValueFixed(%Ld)\n", fixed)); +// "### NumericValControl::_SetValueFixed(%lld)\n", fixed)); // constrain if (fixed > fMaxFixed) @@ -621,14 +621,14 @@ NumericValControl::_SetValueFixed(int64 fixed) scaleBase + digitSegment->scaleFactor() + digitSegment->digitCount()); // PRINT(( -// "\t [] %Ld\n", hiCut)); +// "\t [] %lld\n", hiCut)); // shift value int64 segmentValue = hiCut / (int64)pow(10, scaleBase + digitSegment->scaleFactor()); // PRINT(( -// "\t -> %Ld\n\n", segmentValue)); +// "\t -> %lld\n\n", segmentValue)); digitSegment->setValue(segmentValue, fixed < 0); } diff --git a/src/apps/cortex/ValControl/ValControlDigitSegment.cpp b/src/apps/cortex/ValControl/ValControlDigitSegment.cpp index 4874fe5d0c..a5beaa7a1c 100644 --- a/src/apps/cortex/ValControl/ValControlDigitSegment.cpp +++ b/src/apps/cortex/ValControl/ValControlDigitSegment.cpp @@ -130,7 +130,7 @@ void ValControlDigitSegment::setValue( // int64 nLowPow = m_scaleFactor ? (int64)pow(10.0, abs(m_scaleFactor)) : 1; // int64 nHighPow = (int64)pow(10.0, m_digitCount); // -//// printf(" lowPow %Ld, highPow %Ld\n", nLowPow, nHighPow); +//// printf(" lowPow %lld, highPow %lld\n", nLowPow, nHighPow); // // double dfTemp = bMult ? dfValue * nLowPow : dfValue / nLowPow; //// printf(" -> %.8lf\n", dfTemp); @@ -149,9 +149,9 @@ void ValControlDigitSegment::setValue( // else // nLocal = (int64)dfTemp; // -//// printf(" -> %Ld\n", nLocal); +//// printf(" -> %lld\n", nLocal); // nLocal %= nHighPow; -//// printf(" -> %Ld\n", nLocal); +//// printf(" -> %lld\n", nLocal); // // if(nLocal != m_value || m_negative != m_bWasNegative) { // m_value = nLocal; diff --git a/src/apps/cortex/addons/common/AudioFilterNode.cpp b/src/apps/cortex/addons/common/AudioFilterNode.cpp index 77443486ca..5a76b594b6 100644 --- a/src/apps/cortex/addons/common/AudioFilterNode.cpp +++ b/src/apps/cortex/addons/common/AudioFilterNode.cpp @@ -495,7 +495,7 @@ void AudioFilterNode::BufferReceived( // bigtime_t delta = now - m_tpLastReceived; // m_tpLastReceived = now; // PRINT(( -// "### delta: %Ld (%Ld)\n", +// "### delta: %lld (%lld)\n", // delta, buffer->Header()->start_time - now)); // fetch outbound buffer if needed @@ -781,7 +781,7 @@ void AudioFilterNode::Connect( // // // figure processing time // m_processingLatency = calcProcessingLatency(); -// PRINT(("\tprocessing latency = %Ld\n", m_processingLatency)); +// PRINT(("\tprocessing latency = %lld\n", m_processingLatency)); // // // store summed latency // SetEventLatency(m_downstreamLatency + m_processingLatency); diff --git a/src/apps/diskprobe/DataEditor.cpp b/src/apps/diskprobe/DataEditor.cpp index 7b44a63a6a..dc69f4d814 100644 --- a/src/apps/diskprobe/DataEditor.cpp +++ b/src/apps/diskprobe/DataEditor.cpp @@ -250,7 +250,7 @@ ReplaceChange::Apply(off_t bufferOffset, uint8 *buffer, size_t bufferSize) return; #ifdef TRACE_DATA_EDITOR - printf("Apply %p (buffer offset = %Ld):\n", this, bufferOffset); + printf("Apply %p (buffer offset = %lld):\n", this, bufferOffset); dump_block(buffer + offset - bufferOffset, size, "old:"); dump_block(fNewData + dataOffset, size, "new:"); #endif @@ -279,7 +279,7 @@ ReplaceChange::Revert(off_t bufferOffset, uint8 *buffer, size_t bufferSize) return; #ifdef TRACE_DATA_EDITOR - printf("Revert %p (buffer offset = %Ld):\n", this, bufferOffset); + printf("Revert %p (buffer offset = %lld):\n", this, bufferOffset); dump_block(buffer + offset - bufferOffset, size, "old:"); dump_block(fOldData + dataOffset, size, "new:"); #endif @@ -303,7 +303,7 @@ ReplaceChange::Merge(DataChange *_change) // in hex mode editing. fNewData[fSize - 1] = change->fNewData[0]; #ifdef TRACE_DATA_EDITOR - printf("Merge one byte %p (offset = %Ld, size = %lu):\n", this, fOffset, + printf("Merge one byte %p (offset = %lld, size = %lu):\n", this, fOffset, fSize); dump_block(fOldData, fSize, "old:"); dump_block(fNewData, fSize, "new:"); @@ -349,7 +349,7 @@ ReplaceChange::Merge(DataChange *_change) fSize = size; #ifdef TRACE_DATA_EDITOR - printf("Merge %p (offset = %Ld, size = %lu):\n", this, fOffset, fSize); + printf("Merge %p (offset = %lld, size = %lu):\n", this, fOffset, fSize); dump_block(fOldData, fSize, "old:"); dump_block(fNewData, fSize, "new:"); #endif diff --git a/src/apps/diskprobe/ProbeView.cpp b/src/apps/diskprobe/ProbeView.cpp index 015efedfac..3adcaaa107 100644 --- a/src/apps/diskprobe/ProbeView.cpp +++ b/src/apps/diskprobe/ProbeView.cpp @@ -1520,7 +1520,7 @@ ProbeView::_UpdateSelectionMenuItems(int64 start, int64 end) snprintf(buffer, sizeof(buffer), B_TRANSLATE("Native: 0x%0*Lx"), size * 2, position); } else { - snprintf(buffer, sizeof(buffer), B_TRANSLATE("Native: %Ld (0x%0*Lx)"), + snprintf(buffer, sizeof(buffer), B_TRANSLATE("Native: %lld (0x%0*Lx)"), position, size * 2, position); } @@ -1534,7 +1534,7 @@ ProbeView::_UpdateSelectionMenuItems(int64 start, int64 end) snprintf(buffer, sizeof(buffer), B_TRANSLATE("Swapped: 0x%0*Lx"), size * 2, position); } else { - snprintf(buffer, sizeof(buffer), B_TRANSLATE("Swapped: %Ld (0x%0*Lx)"), + snprintf(buffer, sizeof(buffer), B_TRANSLATE("Swapped: %lld (0x%0*Lx)"), position, size * 2, position); } @@ -1562,7 +1562,7 @@ ProbeView::_UpdateBookmarkMenuItems() if (fDataView->Base() == kHexBase) snprintf(buffer, sizeof(buffer), B_TRANSLATE("Block 0x%Lx"), block); else - snprintf(buffer, sizeof(buffer), B_TRANSLATE("Block %Ld (0x%Lx)"), block, block); + snprintf(buffer, sizeof(buffer), B_TRANSLATE("Block %lld (0x%Lx)"), block, block); item->SetLabel(buffer); } @@ -1602,7 +1602,7 @@ ProbeView::_AddBookmark(off_t position) if (fDataView->Base() == kHexBase) snprintf(buffer, sizeof(buffer), B_TRANSLATE("Block 0x%Lx"), block); else - snprintf(buffer, sizeof(buffer), B_TRANSLATE("Block %Ld (0x%Lx)"), block, block); + snprintf(buffer, sizeof(buffer), B_TRANSLATE("Block %lld (0x%Lx)"), block, block); BMessage* message; item = new BMenuItem(buffer, message = new BMessage(kMsgPositionUpdate)); diff --git a/src/apps/diskprobe/TypeEditors.cpp b/src/apps/diskprobe/TypeEditors.cpp index af022e24b5..67aba5e323 100644 --- a/src/apps/diskprobe/TypeEditors.cpp +++ b/src/apps/diskprobe/TypeEditors.cpp @@ -689,7 +689,7 @@ NumberEditor::_Format(char *buffer) return B_OK; case B_INT64_TYPE: case B_OFF_T_TYPE: - strcpy(buffer, "%Ld"); + strcpy(buffer, "%lld"); return B_OK; case B_UINT64_TYPE: strcpy(buffer, "%Lu"); diff --git a/src/apps/icon-o-matic/generic/support/Debug.h b/src/apps/icon-o-matic/generic/support/Debug.h index accbd8d5a1..97237ada78 100644 --- a/src/apps/icon-o-matic/generic/support/Debug.h +++ b/src/apps/icon-o-matic/generic/support/Debug.h @@ -98,9 +98,9 @@ void dbg_printf_end(); #endif #define DEBUG_THREAD find_thread(NULL) -#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%Ld: %5ld] ", system_time(), DEBUG_THREAD); x; dbg_printf_end(); } -#define DEBUG_CONTEXT_FUNCTION(prefix, x) { dbg_printf_begin(); __out(DEBUG_APP ": [%Ld: %5ld] %s()" prefix, system_time(), DEBUG_THREAD, __FUNCTION__); x; dbg_printf_end(); } -#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%Ld: %5ld] %s():%d: ", system_time(), DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); } +#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%lld: %5ld] ", system_time(), DEBUG_THREAD); x; dbg_printf_end(); } +#define DEBUG_CONTEXT_FUNCTION(prefix, x) { dbg_printf_begin(); __out(DEBUG_APP ": [%lld: %5ld] %s()" prefix, system_time(), DEBUG_THREAD, __FUNCTION__); x; dbg_printf_end(); } +#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%lld: %5ld] %s():%d: ", system_time(), DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); } #define TPRINT(x) DEBUG_CONTEXT( __out x ) #define TREPORT_ERROR(status) DEBUG_CONTEXT_LINE( __out("%s\n", strerror(status)) ) diff --git a/src/apps/mediaplayer/media_node_framework/NodeManager.cpp b/src/apps/mediaplayer/media_node_framework/NodeManager.cpp index a1d9ff466e..298427ba56 100644 --- a/src/apps/mediaplayer/media_node_framework/NodeManager.cpp +++ b/src/apps/mediaplayer/media_node_framework/NodeManager.cpp @@ -620,7 +620,7 @@ NodeManager::_StartNodes() print_error("error getting latency for video producer", status); } else - TRACE("video latency: %Ld\n", latency); + TRACE("video latency: %lld\n", latency); status = fMediaRoster->SetProducerRunModeDelay( fVideoConnection.producer, latency); if (status < B_OK) { @@ -643,7 +643,7 @@ NodeManager::_StartNodes() bigtime_t audioLatency = 0; status = fMediaRoster->GetLatencyFor(fAudioConnection.producer, &audioLatency); - TRACE("audio latency: %Ld\n", audioLatency); + TRACE("audio latency: %lld\n", audioLatency); } BTimeSource* timeSource; diff --git a/src/apps/mediaplayer/media_node_framework/audio/AudioAdapter.cpp b/src/apps/mediaplayer/media_node_framework/audio/AudioAdapter.cpp index 9b2be3bfc6..c66ee5d7a5 100644 --- a/src/apps/mediaplayer/media_node_framework/audio/AudioAdapter.cpp +++ b/src/apps/mediaplayer/media_node_framework/audio/AudioAdapter.cpp @@ -93,7 +93,7 @@ AudioAdapter::InitialLatency() const status_t AudioAdapter::Read(void* buffer, int64 pos, int64 frames) { - TRACE("AudioAdapter::Read(%p, %Ld, %Ld)\n", buffer, pos, frames); + TRACE("AudioAdapter::Read(%p, %lld, %lld)\n", buffer, pos, frames); status_t error = InitCheck(); if (error != B_OK) return error; diff --git a/src/apps/mediaplayer/media_node_framework/audio/AudioChannelConverter.cpp b/src/apps/mediaplayer/media_node_framework/audio/AudioChannelConverter.cpp index ffca357d76..b8c510d766 100644 --- a/src/apps/mediaplayer/media_node_framework/audio/AudioChannelConverter.cpp +++ b/src/apps/mediaplayer/media_node_framework/audio/AudioChannelConverter.cpp @@ -95,7 +95,7 @@ AudioChannelConverter::InitialLatency() const status_t AudioChannelConverter::Read(void* outBuffer, int64 pos, int64 frames) { - TRACE("AudioChannelConverter::Read(%p, %Ld, %Ld)\n", outBuffer, pos, frames); + TRACE("AudioChannelConverter::Read(%p, %lld, %lld)\n", outBuffer, pos, frames); status_t error = InitCheck(); if (error != B_OK) return error; diff --git a/src/apps/mediaplayer/media_node_framework/audio/AudioFormatConverter.cpp b/src/apps/mediaplayer/media_node_framework/audio/AudioFormatConverter.cpp index f6e24f34e8..6ec6fec024 100644 --- a/src/apps/mediaplayer/media_node_framework/audio/AudioFormatConverter.cpp +++ b/src/apps/mediaplayer/media_node_framework/audio/AudioFormatConverter.cpp @@ -189,7 +189,7 @@ AudioFormatConverter::InitialLatency() const status_t AudioFormatConverter::Read(void* buffer, int64 pos, int64 frames) { - TRACE("AudioFormatConverter::Read(%p, %Ld, %Ld)\n", buffer, pos, frames); + TRACE("AudioFormatConverter::Read(%p, %lld, %lld)\n", buffer, pos, frames); status_t error = InitCheck(); if (error != B_OK) { TRACE("AudioFormatConverter::Read() done 1\n"); diff --git a/src/apps/mediaplayer/media_node_framework/audio/AudioResampler.cpp b/src/apps/mediaplayer/media_node_framework/audio/AudioResampler.cpp index f7ad2f42b6..383e0b63d1 100644 --- a/src/apps/mediaplayer/media_node_framework/audio/AudioResampler.cpp +++ b/src/apps/mediaplayer/media_node_framework/audio/AudioResampler.cpp @@ -109,7 +109,7 @@ AudioResampler::InitialLatency() const status_t AudioResampler::Read(void* buffer, int64 pos, int64 frames) { - TRACE("AudioResampler::Read(%p, %Ld, %Ld)\n", buffer, pos, frames); + TRACE("AudioResampler::Read(%p, %lld, %lld)\n", buffer, pos, frames); status_t error = InitCheck(); if (error != B_OK) { diff --git a/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp b/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp index b5c2b86703..8676e16a1f 100644 --- a/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp +++ b/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp @@ -555,7 +555,7 @@ void VideoProducer::_HandleStart(bigtime_t performanceTime) { // Start producing frames, even if the output hasn't been connected yet. - TRACE("_HandleStart(%Ld)\n", performanceTime); + TRACE("_HandleStart(%lld)\n", performanceTime); if (fRunning) { TRACE("_HandleStart: Node already started\n"); @@ -637,7 +637,7 @@ VideoProducer::_FrameGeneratorThread() const int32 kMaxDroppedFrames = 15; bool running = true; while (running) { - TRACE("_FrameGeneratorThread: loop: %Ld\n", fFrame); + TRACE("_FrameGeneratorThread: loop: %lld\n", fFrame); // lock the node manager status_t err = fManager->LockWithTimeout(10000); bool ignoreEvent = false; @@ -666,7 +666,7 @@ VideoProducer::_FrameGeneratorThread() bool newPlayingState; playlistFrame = fManager->PlaylistFrameAtFrame(fFrame, playingDirection, newPlayingState); - TRACE("_FrameGeneratorThread: performance time: %Ld, " + TRACE("_FrameGeneratorThread: performance time: %lld, " "playlist frame: %lld\n", performanceTime, playlistFrame); forceSendingBuffer |= newPlayingState; fManager->SetCurrentVideoTime(nextPerformanceTime); @@ -688,7 +688,7 @@ VideoProducer::_FrameGeneratorThread() return B_OK; } - TRACE("_FrameGeneratorThread: waiting (%Ld)...\n", waitUntil); + TRACE("_FrameGeneratorThread: waiting (%lld)...\n", waitUntil); // wait until... err = acquire_sem_etc(fFrameSync, 1, B_ABSOLUTE_TIMEOUT, waitUntil); // The only acceptable responses are B_OK and B_TIMED_OUT. Everything @@ -755,8 +755,8 @@ VideoProducer::_FrameGeneratorThread() h->u.raw_video.line_count = fConnectedFormat.display.line_count; // Fill in a frame - TRACE("_FrameGeneratorThread: frame: %Ld, " - "playlistFrame: %Ld\n", fFrame, playlistFrame); + TRACE("_FrameGeneratorThread: frame: %lld, " + "playlistFrame: %lld\n", fFrame, playlistFrame); bool wasCached = false; err = fSupplier->FillBuffer(playlistFrame, buffer->Data(), fConnectedFormat, forceSendingBuffer, diff --git a/src/apps/packageinstaller/PackageInfo.cpp b/src/apps/packageinstaller/PackageInfo.cpp index c976610bd7..d22a76cac2 100644 --- a/src/apps/packageinstaller/PackageInfo.cpp +++ b/src/apps/packageinstaller/PackageInfo.cpp @@ -600,7 +600,7 @@ PackageInfo::Parse() } swap_data(B_UINT64_TYPE, &size, sizeof(uint64), B_SWAP_BENDIAN_TO_HOST); - parser_debug("DQSz - %Ld\n", size); + parser_debug("DQSz - %lld\n", size); } else if (!memcmp(buffer, "DQMi", 5)) { // TODO actually check if the query finds a file with // size found previously diff --git a/src/apps/processcontroller/ThreadBarMenu.cpp b/src/apps/processcontroller/ThreadBarMenu.cpp index 2df8d3e1ba..39c421acf9 100644 --- a/src/apps/processcontroller/ThreadBarMenu.cpp +++ b/src/apps/processcontroller/ThreadBarMenu.cpp @@ -88,7 +88,7 @@ ThreadBarMenu::AddNew() k = fThreadsRecCount; // flag that the search didn't work. } if (k == fThreadsRecCount) { -// printf("*** Thread %d %s/%s, user %Ld, kernel %Ld\n", info.thread, info.name, info.user_time, info.kernel_time); +// printf("*** Thread %d %s/%s, user %lld, kernel %lld\n", info.thread, info.name, info.user_time, info.kernel_time); // this is a new thread... k = 0; while (k < fThreadsRecCount && !(fThreadsRec[k].thread == -1 || fThreadsRec[k].last_round+1 < fRound)) diff --git a/src/apps/soundrecorder/TrackSlider.cpp b/src/apps/soundrecorder/TrackSlider.cpp index 8689e5d4e0..859c2fddf2 100644 --- a/src/apps/soundrecorder/TrackSlider.cpp +++ b/src/apps/soundrecorder/TrackSlider.cpp @@ -340,7 +340,7 @@ TrackSlider::_UpdatePosition(BPoint point) Invoke(&msg); _RenderBitmap(); - //printf("fLeftPos : %Ld\n", fLeftTime); + //printf("fLeftPos : %lld\n", fLeftTime); } else if (!fMainTracking && (fRightTracking || ((point.x > fBitmapView->fPositionX+4) && rightRect.Contains(point)))) { @@ -369,7 +369,7 @@ TrackSlider::_UpdatePosition(BPoint point) Invoke(&msg); _RenderBitmap(); - //printf("fRightPos : %Ld\n", fRightTime); + //printf("fRightPos : %lld\n", fRightTime); } else { fBitmapView->fPositionX = MIN(MAX(point.x, 15), fBitmapView->fRight); fMainTime = (bigtime_t)(MAX(MIN((fBitmapView->fPositionX - 15) @@ -392,7 +392,7 @@ TrackSlider::_UpdatePosition(BPoint point) } Invoke(&msg); - //printf("fPosition : %Ld\n", fMainTime); + //printf("fPosition : %lld\n", fMainTime); } Draw(Bounds()); Flush(); diff --git a/src/apps/tv/VideoNode.cpp b/src/apps/tv/VideoNode.cpp index a9aaff4f08..94206bc24a 100644 --- a/src/apps/tv/VideoNode.cpp +++ b/src/apps/tv/VideoNode.cpp @@ -374,7 +374,7 @@ VideoNode::HandleBuffer(BBuffer *buffer) buffer->Data(), fInput.format.u.raw_video.display.bytes_per_row); } -// printf("overlay copy: %Ld usec\n", system_time() - start); +// printf("overlay copy: %lld usec\n", system_time() - start); } UnlockBitmap(); diff --git a/src/bin/badblocks.cpp b/src/bin/badblocks.cpp index e8227b62ca..347253d2bc 100644 --- a/src/bin/badblocks.cpp +++ b/src/bin/badblocks.cpp @@ -46,18 +46,18 @@ int scan_device(const char *dev, off_t startBlock, off_t endBlock) for (; block <= endBlock; block += group, at += len) { int got; if (progress) - fprintf(stderr, "checking block %Ld\x1b[1A\n", block); + fprintf(stderr, "checking block %lld\x1b[1A\n", block); got = pread(fd, buffer, len, at); if (got == len) continue; if (got >= 0) { if (verbose) - fprintf(stderr, "block %Ld (offset %Ld): got %d < %zd\n", + fprintf(stderr, "block %lld (offset %lld): got %d < %zd\n", block, at, got, len); break; } if (got < 0) { - fprintf(stderr, "block %Ld: error: %s\n", block, strerror(errno)); + fprintf(stderr, "block %lld: error: %s\n", block, strerror(errno)); /* if (errno != EIO && errno != ENXIO) { perror("pread"); @@ -72,10 +72,10 @@ int scan_device(const char *dev, off_t startBlock, off_t endBlock) continue; if (got < blockSize) { if (got < 0) - fprintf(stderr, "block %Ld: error: %s\n", block + i, strerror(errno)); + fprintf(stderr, "block %lld: error: %s\n", block + i, strerror(errno)); else - fprintf(stderr, "block %Ld: read %d bytes\n", block + i, got); - fprintf(outputFile, "%Ld\n", block + i); + fprintf(stderr, "block %lld: read %d bytes\n", block + i, got); + fprintf(outputFile, "%lld\n", block + i); fflush(stdout); } } diff --git a/src/bin/bfs_tools/bfswhich.cpp b/src/bin/bfs_tools/bfswhich.cpp index 93e63d2619..2829154c21 100644 --- a/src/bin/bfs_tools/bfswhich.cpp +++ b/src/bin/bfs_tools/bfswhich.cpp @@ -217,7 +217,7 @@ testBitmap(Disk& disk, const block_run& run) return; } - printf("Block bitmap sees block %Ld as %s.\n", disk.ToBlock(run), + printf("Block bitmap sees block %lld as %s.\n", disk.ToBlock(run), bitmap.UsedAt(disk.ToBlock(run)) ? "used" : "free"); } diff --git a/src/bin/bfs_tools/chkindex.cpp b/src/bin/bfs_tools/chkindex.cpp index 3850cba862..a64b1b94c6 100644 --- a/src/bin/bfs_tools/chkindex.cpp +++ b/src/bin/bfs_tools/chkindex.cpp @@ -154,7 +154,7 @@ checkIndexForNonExistingFiles(Disk &disk,BPlusTree &tree) block_run run = disk.ToBlockRun(offset); if (!gHashtable.Contains(&run)) { - printf(" inode at (%ld, %d), offset %Ld, doesn't exist!",run.allocation_group,run.start,offset); + printf(" inode at (%ld, %d), offset %lld, doesn't exist!",run.allocation_group,run.start,offset); switch (tree.Type()) { case BPLUSTREE_STRING_TYPE: @@ -167,7 +167,7 @@ checkIndexForNonExistingFiles(Disk &disk,BPlusTree &tree) printf(" (uint32 = %lu)",*(uint32 *)&name); break; case BPLUSTREE_INT64_TYPE: - printf(" (int64 = %Ld)",*(int64 *)&name); + printf(" (int64 = %lld)",*(int64 *)&name); break; case BPLUSTREE_UINT64_TYPE: printf(" (uint64 = %Lu)",*(uint64 *)&name); @@ -335,7 +335,7 @@ checkFiles(Disk &disk,BPlusTree &tree,char *attribute) tree.Rewind(); while (tree.GetNextEntry(name,&length,B_FILE_NAME_LENGTH,&offset) == B_OK) { - //printf("search for = %ld, key = %ld -> value = %Ld (%ld, %d)\n",*(int32 *)&key,*(int32 *)&name,offset,disk.ToBlockRun(offset).allocation_group,disk.ToBlockRun(offset).start); + //printf("search for = %ld, key = %ld -> value = %lld (%ld, %d)\n",*(int32 *)&key,*(int32 *)&name,offset,disk.ToBlockRun(offset).allocation_group,disk.ToBlockRun(offset).start); if (keyLength == length && !memcmp(key,name,keyLength)) { duplicates = true; diff --git a/src/bin/bfs_tools/lib/Bitmap.cpp b/src/bin/bfs_tools/lib/Bitmap.cpp index a23661ae43..629bf0f609 100644 --- a/src/bin/bfs_tools/lib/Bitmap.cpp +++ b/src/bin/bfs_tools/lib/Bitmap.cpp @@ -165,7 +165,7 @@ Bitmap::BackupSet(Inode *inode, bool used) // the attributes are ignored for now, because they will // be added anyway since all inodes from disk are collected. -// printf("a: %Ld\n",inode->Block()); +// printf("a: %lld\n",inode->Block()); BackupSetAt(inode->Block(),used); // the data stream of symlinks is no real data stream @@ -194,7 +194,7 @@ Bitmap::BackupSet(Inode *inode, bool used) if (node->data.max_indirect_range == 0 || node->data.indirect.IsZero()) return; -// printf("c: %Ld\n",fDisk->ToBlock(node->data.indirect)); +// printf("c: %lld\n",fDisk->ToBlock(node->data.indirect)); BackupSetAt(fDisk->ToBlock(node->data.indirect), used); DataStream *stream = dynamic_cast(inode); @@ -219,7 +219,7 @@ Bitmap::BackupSet(Inode *inode, bool used) off_t start = fDisk->ToBlock(indirect[i]); off_t end = start + indirect[i].length; for (off_t block = start; block < end; block++) { -// printf("d: %Ld\n", block); +// printf("d: %lld\n", block); if (!BackupSetAt(block, used)) break; } @@ -232,7 +232,7 @@ Bitmap::BackupSet(Inode *inode, bool used) || node->data.double_indirect.IsZero()) return; -// printf("e: %Ld\n",fDisk->ToBlock(node->data.double_indirect)); +// printf("e: %lld\n",fDisk->ToBlock(node->data.double_indirect)); BackupSetAt(fDisk->ToBlock(node->data.double_indirect), used); // FIXME: to be implemented... diff --git a/src/bin/bfs_tools/lib/Inode.cpp b/src/bin/bfs_tools/lib/Inode.cpp index aef986e9d8..1b6a909eb1 100644 --- a/src/bin/bfs_tools/lib/Inode.cpp +++ b/src/bin/bfs_tools/lib/Inode.cpp @@ -698,7 +698,7 @@ DataStream::FindBlockRun(off_t pos) int32 directSize = fDisk->BlockSize() * 4; int32 index = start / indirectSize; - //printf("\tstart = %Ld, indirectSize = %ld, directSize = %ld, index = %ld\n",start,indirectSize,directSize,index); + //printf("\tstart = %lld, indirectSize = %ld, directSize = %ld, index = %ld\n",start,indirectSize,directSize,index); //printf("\tlook for indirect block at %ld,%d\n",indirect[index].allocation_group,indirect[index].start); indirect = (block_run *)fDisk->ReadBlockRun(indirect[index]); if (indirect == NULL) @@ -708,7 +708,7 @@ DataStream::FindBlockRun(off_t pos) fRunFileOffset = fInode->data.max_indirect_range + (index * indirectSize) + (fCurrent * directSize); fRunBlockEnd = fRunFileOffset + directSize; fRun = indirect[fCurrent]; - //printf("\tfCurrent = %ld, fRunFileOffset = %Ld, fRunBlockEnd = %Ld, fRun = %ld,%d\n",fCurrent,fRunFileOffset,fRunBlockEnd,fRun.allocation_group,fRun.start); + //printf("\tfCurrent = %ld, fRunFileOffset = %lld, fRunBlockEnd = %lld, fRun = %ld,%d\n",fCurrent,fRunFileOffset,fRunBlockEnd,fRun.allocation_group,fRun.start); } else { // access from indirect blocks @@ -738,7 +738,7 @@ DataStream::FindBlockRun(off_t pos) fRun = indirect[fCurrent]; //printf("reading from indirect block: %ld,%d\n",fRun.allocation_group,fRun.start); - //printf("### indirect-run[%ld] = (%ld,%d,%d), offset = %Ld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); + //printf("### indirect-run[%ld] = (%ld,%d,%d), offset = %lld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); } } else { // access from direct blocks @@ -761,7 +761,7 @@ DataStream::FindBlockRun(off_t pos) return B_ERROR; fRun = fInode->data.direct[fCurrent]; - //printf("### run[%ld] = (%ld,%d,%d), offset = %Ld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); + //printf("### run[%ld] = (%ld,%d,%d), offset = %lld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); } return B_OK; } @@ -772,7 +772,7 @@ DataStream::ReadAt(off_t pos, void *buffer, size_t size) { NodeGetter _(this); - //printf("DataStream::ReadAt(pos = %Ld,buffer = %p,size = %ld);\n",pos,buffer,size); + //printf("DataStream::ReadAt(pos = %lld,buffer = %p,size = %ld);\n",pos,buffer,size); // truncate size to read if (pos + (off_t)size > fInode->data.size) { if (pos > fInode->data.size) // reading outside the file @@ -784,7 +784,7 @@ DataStream::ReadAt(off_t pos, void *buffer, size_t size) } ssize_t read = 0; - //printf("### read %ld bytes at %Ld\n",size,pos); + //printf("### read %ld bytes at %lld\n",size,pos); while (size > 0) { status_t status = FindBlockRun(pos); if (status < B_OK) @@ -792,7 +792,7 @@ DataStream::ReadAt(off_t pos, void *buffer, size_t size) ssize_t bytes = min_c((off_t)size, fRunBlockEnd - pos); - //printf("### read %ld bytes from %Ld\n### --\n",bytes,fDisk->ToOffset(fRun) + pos - fRunFileOffset); + //printf("### read %ld bytes from %lld\n### --\n",bytes,fDisk->ToOffset(fRun) + pos - fRunFileOffset); bytes = fDisk->ReadAt(fDisk->ToOffset(fRun) + pos - fRunFileOffset, buffer, bytes); if (bytes <= 0) { @@ -831,7 +831,7 @@ DataStream::WriteAt(off_t pos, const void *buffer, size_t size) } ssize_t written = 0; - //printf("### write %ld bytes at %Ld\n",size,pos); + //printf("### write %ld bytes at %lld\n",size,pos); while (size > 0) { status_t status = FindBlockRun(pos); if (status < B_OK) @@ -839,7 +839,7 @@ DataStream::WriteAt(off_t pos, const void *buffer, size_t size) ssize_t bytes = min_c((off_t)size, fRunBlockEnd - pos); - //printf("### write %ld bytes to %Ld\n### --\n",bytes,fDisk->ToOffset(fRun) + pos - fRunFileOffset); + //printf("### write %ld bytes to %lld\n### --\n",bytes,fDisk->ToOffset(fRun) + pos - fRunFileOffset); bytes = fDisk->WriteAt(fDisk->ToOffset(fRun) + pos - fRunFileOffset,buffer,bytes); if (bytes < 0) return bytes; diff --git a/src/bin/bfs_tools/recover.cpp b/src/bin/bfs_tools/recover.cpp index ad4f60b19a..5ea20128ea 100644 --- a/src/bin/bfs_tools/recover.cpp +++ b/src/bin/bfs_tools/recover.cpp @@ -233,7 +233,7 @@ collectInodes(Disk& disk, RunSet* set, InodeHashtable* hashTable, off_t start, } //if ((offset % (disk.BlockSize() << disk.SuperBlock()->ag_shift)) == 0) - // printf("reading block %Ld, allocation group %Ld, %Ld inodes...\33[1A\n", offset / disk.BlockSize(),offset / (disk.BlockSize() << disk.SuperBlock()->ag_shift), count); + // printf("reading block %lld, allocation group %lld, %lld inodes...\33[1A\n", offset / disk.BlockSize(),offset / (disk.BlockSize() << disk.SuperBlock()->ag_shift), count); for (uint32 i = 0; i < sizeof(buffer); i += disk.BlockSize()) { inode.SetTo((bfs_inode *)(buffer + i)); diff --git a/src/bin/mail_utils/spamdbm.cpp b/src/bin/mail_utils/spamdbm.cpp index b21c6b8f2b..7d57f26e9a 100644 --- a/src/bin/mail_utils/spamdbm.cpp +++ b/src/bin/mail_utils/spamdbm.cpp @@ -189,7 +189,7 @@ * Ooops, int64 doesn't exist, use long long instead. * * Revision 1.79 2003/04/07 19:05:22 agmsmith - * Now with Allen Brunson's atoll for PPC (you need the %Ld, but that + * Now with Allen Brunson's atoll for PPC (you need the %lld, but that * becomes %lld on other systems). * * Revision 1.78 2003/04/04 22:43:53 agmsmith diff --git a/src/build/libbe/app/Message.cpp b/src/build/libbe/app/Message.cpp index a49839a4cc..8a3457b961 100644 --- a/src/build/libbe/app/Message.cpp +++ b/src/build/libbe/app/Message.cpp @@ -572,11 +572,11 @@ BMessage::_PrintToStream(const char* indent) const break; case B_INT64_TYPE: - print_type("int64(0x%Lx or %Ld)\n", pointer); + print_type("int64(0x%Lx or %lld)\n", pointer); break; case B_UINT64_TYPE: - print_type("uint64(0x%Lx or %Ld\n", pointer); + print_type("uint64(0x%Lx or %lld\n", pointer); break; case B_BOOL_TYPE: diff --git a/src/kits/app/Message.cpp b/src/kits/app/Message.cpp index d0a36227e5..7ce543f3c3 100644 --- a/src/kits/app/Message.cpp +++ b/src/kits/app/Message.cpp @@ -684,11 +684,11 @@ BMessage::_PrintToStream(const char* indent) const break; case B_INT64_TYPE: - print_type("int64(0x%Lx or %Ld)\n", pointer); + print_type("int64(0x%Lx or %lld)\n", pointer); break; case B_UINT64_TYPE: - print_type("uint64(0x%Lx or %Ld)\n", pointer); + print_type("uint64(0x%Lx or %lld)\n", pointer); break; case B_BOOL_TYPE: diff --git a/src/kits/media/BufferConsumer.cpp b/src/kits/media/BufferConsumer.cpp index 277adcb55d..61da866de2 100644 --- a/src/kits/media/BufferConsumer.cpp +++ b/src/kits/media/BufferConsumer.cpp @@ -388,7 +388,7 @@ BBufferConsumer::HandleMessage(int32 message, const void* data, size_t size) buffer->SetHeader(&command->header); PRINT(4, "calling BBufferConsumer::BufferReceived buffer %ld " - "at perf %Ld and TimeSource()->Now() is %Ld\n", + "at perf %lld and TimeSource()->Now() is %lld\n", buffer->Header()->buffer, buffer->Header()->start_time, TimeSource()->Now()); diff --git a/src/kits/media/MediaRoster.cpp b/src/kits/media/MediaRoster.cpp index d162c5f3e3..b08f873854 100644 --- a/src/kits/media/MediaRoster.cpp +++ b/src/kits/media/MediaRoster.cpp @@ -2912,7 +2912,7 @@ BMediaRoster::GetLatencyFor(const media_node& producer, bigtime_t* _latency) *_latency = reply.latency; -// printf("BMediaRoster::GetLatencyFor producer %ld has maximum latency %Ld\n", producer.node, *out_latency); +// printf("BMediaRoster::GetLatencyFor producer %ld has maximum latency %lld\n", producer.node, *out_latency); return B_OK; } diff --git a/src/kits/media/SoundPlayNode.cpp b/src/kits/media/SoundPlayNode.cpp index a2737e5e03..2e83235201 100644 --- a/src/kits/media/SoundPlayNode.cpp +++ b/src/kits/media/SoundPlayNode.cpp @@ -657,13 +657,13 @@ SoundPlayNode::SendNewBuffer(const media_timed_event* event, bigtime_t how_early = event->event_time - TimeSource()->Now() - fLatency - fInternalLatency; if (how_early > 5000) { - TRACE("SoundPlayNode::SendNewBuffer, event scheduled too early, how_early is %Ld\n", how_early); + TRACE("SoundPlayNode::SendNewBuffer, event scheduled too early, how_early is %lld\n", how_early); if (fTooEarlyCount++ == 5) { fInternalLatency -= how_early; if (fInternalLatency < 500) fInternalLatency = 500; - TRACE("SoundPlayNode::SendNewBuffer setting internal latency to %Ld\n", fInternalLatency); + TRACE("SoundPlayNode::SendNewBuffer setting internal latency to %lld\n", fInternalLatency); SetEventLatency(fLatency + fInternalLatency); fTooEarlyCount = 0; } diff --git a/src/kits/tracker/TaskLoop.cpp b/src/kits/tracker/TaskLoop.cpp index fb89ea801c..ceb96d057d 100644 --- a/src/kits/tracker/TaskLoop.cpp +++ b/src/kits/tracker/TaskLoop.cpp @@ -242,7 +242,7 @@ RunWhenIdleTask::RunIfNeeded(bigtime_t currentTime) return false; fRunAfter = currentTime + fPeriod; -// PRINT(("runWhenIdle: runAfter %Ld, current time %Ld, period %Ld\n", +// PRINT(("runWhenIdle: runAfter %lld, current time %lld, period %lld\n", // fRunAfter, currentTime, fPeriod)); if (fState == kInitialDelay) { @@ -290,7 +290,7 @@ RunWhenIdleTask::IsIdle(bigtime_t currentTime, float taskOverhead) idle = false; } else if ((currentTime - fLastCPUTooBusyTime) < fIdleFor || idle_time() < fIdleFor) { -// PRINT(("load %f, not idle long enough %Ld, %Ld\n", load, +// PRINT(("load %f, not idle long enough %lld, %lld\n", load, // currentTime - fLastCPUTooBusyTime, // idle_time())); idle = false; @@ -298,7 +298,7 @@ RunWhenIdleTask::IsIdle(bigtime_t currentTime, float taskOverhead) #if xDEBUG else - PRINT(("load %f, idle for %Ld sec, go\n", load, + PRINT(("load %f, idle for %lld sec, go\n", load, (currentTime - fLastCPUTooBusyTime) / 1000000)); #endif diff --git a/src/kits/tracker/Tests.cpp b/src/kits/tracker/Tests.cpp index 1e1aef7842..6fad2c2971 100644 --- a/src/kits/tracker/Tests.cpp +++ b/src/kits/tracker/Tests.cpp @@ -238,11 +238,11 @@ IconSpewer::DrawSomeOld() view->SetHighColor(0, 0, 0); char buffer[256]; if (cycleTime) { - sprintf(buffer, "last cycle time %Ld ms", cycleTime/1000); + sprintf(buffer, "last cycle time %lld ms", cycleTime/1000); view->DrawString(buffer, BPoint(20, bounds.bottom - 20)); } if (numDrawn) { - sprintf(buffer, "average draw time %Ld us per icon", + sprintf(buffer, "average draw time %lld us per icon", watch.ElapsedTime() / numDrawn); view->DrawString(buffer, BPoint(20, bounds.bottom - 30)); } diff --git a/src/kits/tracker/Utilities.h b/src/kits/tracker/Utilities.h index 4736e93a6a..fa5da9df48 100644 --- a/src/kits/tracker/Utilities.h +++ b/src/kits/tracker/Utilities.h @@ -518,7 +518,7 @@ inline void PrintDirToStream(const BDirectory*, const char* = 0) {} if (logFile != 0) { \ thread_info info; \ get_thread_info(find_thread(NULL), &info); \ - PrintToLogFile("[t %Ld] \"%s\" (%s:%i) ", system_time(), \ + PrintToLogFile("[t %lld] \"%s\" (%s:%i) ", system_time(), \ info.name, __FILE__, __LINE__); \ PrintToLogFile _ARGS_; \ PrintToLogFile("\n"); \ diff --git a/src/kits/tracker/WidgetAttributeText.cpp b/src/kits/tracker/WidgetAttributeText.cpp index 6258f1f4e0..864173455a 100644 --- a/src/kits/tracker/WidgetAttributeText.cpp +++ b/src/kits/tracker/WidgetAttributeText.cpp @@ -109,7 +109,7 @@ TruncFileSizeBase(BString* outString, int64 value, const View* view, "{0, plural, one{# byte} other{# bytes}}")); format.Format(buffer, value); if (view->StringWidth(buffer.String()) > width) - buffer.SetToFormat(B_TRANSLATE("%Ld B"), value); + buffer.SetToFormat(B_TRANSLATE("%lld B"), value); } else { const char* suffix; float doubleValue; diff --git a/src/system/boot/arch/x86/arch_cpu.cpp b/src/system/boot/arch/x86/arch_cpu.cpp index 1ba2d0da18..a205a08be5 100644 --- a/src/system/boot/arch/x86/arch_cpu.cpp +++ b/src/system/boot/arch/x86/arch_cpu.cpp @@ -287,10 +287,10 @@ slower_sample: #ifdef TRACE_CPU if (clockSpeed > 1000000000LL) { - dprintf("CPU at %Ld.%03Ld GHz\n", clockSpeed / 1000000000LL, + dprintf("CPU at %lld.%03Ld GHz\n", clockSpeed / 1000000000LL, (clockSpeed % 1000000000LL) / 1000000LL); } else { - dprintf("CPU at %Ld.%03Ld MHz\n", clockSpeed / 1000000LL, + dprintf("CPU at %lld.%03Ld MHz\n", clockSpeed / 1000000LL, (clockSpeed % 1000000LL) / 1000LL); } #endif diff --git a/src/system/boot/loader/file_systems/bfs/Stream.cpp b/src/system/boot/loader/file_systems/bfs/Stream.cpp index d134e6f038..6f9f6c8c7f 100644 --- a/src/system/boot/loader/file_systems/bfs/Stream.cpp +++ b/src/system/boot/loader/file_systems/bfs/Stream.cpp @@ -220,7 +220,7 @@ Stream::FindBlockRun(off_t pos, block_run& run, off_t& offset) if (indirect == NULL) return B_ERROR; - //printf("\tstart = %Ld, indirectSize = %ld, directSize = %ld, index = %ld\n",start,indirectSize,directSize,index); + //printf("\tstart = %lld, indirectSize = %ld, directSize = %ld, index = %ld\n",start,indirectSize,directSize,index); //printf("\tlook for indirect block at %ld,%d\n",indirect[index].allocation_group,indirect[index].start); int32 current = (start % indirectSize) / directSize; @@ -233,7 +233,7 @@ Stream::FindBlockRun(off_t pos, block_run& run, off_t& offset) run = indirect[current % runsPerBlock]; offset = data.MaxIndirectRange() + (index * indirectSize) + (current * directSize); - //printf("\tfCurrent = %ld, fRunFileOffset = %Ld, fRunBlockEnd = %Ld, fRun = %ld,%d\n",fCurrent,fRunFileOffset,fRunBlockEnd,fRun.allocation_group,fRun.start); + //printf("\tfCurrent = %ld, fRunFileOffset = %lld, fRunBlockEnd = %lld, fRun = %ld,%d\n",fCurrent,fRunFileOffset,fRunBlockEnd,fRun.allocation_group,fRun.start); } else { // access to indirect blocks @@ -260,7 +260,7 @@ Stream::FindBlockRun(off_t pos, block_run& run, off_t& offset) offset = runBlockEnd - ((uint32)run.Length() << cached.BlockShift()); //printf("reading from indirect block: %ld,%d\n",fRun.allocation_group,fRun.start); - //printf("### indirect-run[%ld] = (%ld,%d,%d), offset = %Ld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); + //printf("### indirect-run[%ld] = (%ld,%d,%d), offset = %lld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); return fVolume.ValidateBlockRun(run); } } @@ -281,11 +281,11 @@ Stream::FindBlockRun(off_t pos, block_run& run, off_t& offset) if (runBlockEnd > pos) { run = data.direct[current]; offset = runBlockEnd - ((uint32)run.Length() << fVolume.BlockShift()); - //printf("### run[%ld] = (%ld,%d,%d), offset = %Ld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); + //printf("### run[%ld] = (%ld,%d,%d), offset = %lld\n",fCurrent,fRun.allocation_group,fRun.start,fRun.length,fRunFileOffset); return fVolume.ValidateBlockRun(run); } } - //PRINT(("FindBlockRun() failed in direct range: size = %Ld, pos = %Ld\n",data.size,pos)); + //PRINT(("FindBlockRun() failed in direct range: size = %lld, pos = %lld\n",data.size,pos)); return B_ENTRY_NOT_FOUND; } return fVolume.ValidateBlockRun(run); diff --git a/src/system/boot/loader/file_systems/fat/File.cpp b/src/system/boot/loader/file_systems/fat/File.cpp index 60ac2e8fb5..a72da1f93d 100644 --- a/src/system/boot/loader/file_systems/fat/File.cpp +++ b/src/system/boot/loader/file_systems/fat/File.cpp @@ -68,7 +68,7 @@ File::Close(void *cookie) ssize_t File::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize) { - TRACE(("FATFS::File::%s(, %Ld,, %d)\n", __FUNCTION__, pos, bufferSize)); + TRACE(("FATFS::File::%s(, %lld,, %d)\n", __FUNCTION__, pos, bufferSize)); status_t err; err = fStream.ReadAt(pos, buffer, &bufferSize); if (err < B_OK) diff --git a/src/system/boot/loader/file_systems/fat/Stream.cpp b/src/system/boot/loader/file_systems/fat/Stream.cpp index 07874cfd55..958c35f6e2 100644 --- a/src/system/boot/loader/file_systems/fat/Stream.cpp +++ b/src/system/boot/loader/file_systems/fat/Stream.cpp @@ -38,7 +38,7 @@ Stream::Stream(Volume &volume, uint32 chain, off_t size, const char *name) fClusterMapCacheLast(0), fSize(size) { - TRACE(("FATFS::Stream::(, %d, %Ld, %s)\n", chain, size, name)); + TRACE(("FATFS::Stream::(, %d, %lld, %s)\n", chain, size, name)); fName[FATFS_NAME_LENGTH] = '\0'; strlcpy(fName, name, FATFS_NAME_LENGTH+1); fClusterCount = (fSize + fVolume.ClusterSize() - 1) / fVolume.ClusterSize(); @@ -109,7 +109,7 @@ Stream::GetFileMap(struct file_map_run *runs, int32 *count) status_t Stream::_FindCluster(off_t pos, uint32& _cluster) { - //TRACE(("FATFS::Stream::%s(%Ld,,)\n", __FUNCTION__, pos)); + //TRACE(("FATFS::Stream::%s(%lld,,)\n", __FUNCTION__, pos)); uint32 index = (uint32)(pos / fVolume.ClusterSize()); if (pos > fSize || index >= fClusterCount) return B_BAD_VALUE; @@ -234,7 +234,7 @@ Stream::FindBlock(off_t pos, off_t &block, off_t &offset) status_t Stream::ReadAt(off_t pos, void *_buffer, size_t *_length, off_t *diskOffset) { - TRACE(("FATFS::Stream::%s(%Ld, )\n", __FUNCTION__, pos)); + TRACE(("FATFS::Stream::%s(%lld, )\n", __FUNCTION__, pos)); uint8* buffer = (uint8*)_buffer; diff --git a/src/system/boot/platform/atari_m68k/devices.cpp b/src/system/boot/platform/atari_m68k/devices.cpp index 5738e94369..6bd9d3c6cf 100644 --- a/src/system/boot/platform/atari_m68k/devices.cpp +++ b/src/system/boot/platform/atari_m68k/devices.cpp @@ -429,7 +429,7 @@ find_unique_check_sums(NodeList *devices) disk.device.unknown.check_sums[i].offset = offset; disk.device.unknown.check_sums[i].sum = compute_check_sum(drive, offset); - TRACE(("disk %x, offset %Ld, sum %lu\n", drive->DriveID(), offset, + TRACE(("disk %x, offset %lld, sum %lu\n", drive->DriveID(), offset, disk.device.unknown.check_sums[i].sum)); } @@ -606,12 +606,12 @@ BlockHandle::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize) ssize_t ret; uint32 offset = pos % fBlockSize; pos /= fBlockSize; - TRACE(("BlockHandle::%s: (%d) %Ld, %d\n", __FUNCTION__, fHandle, pos, bufferSize)); + TRACE(("BlockHandle::%s: (%d) %lld, %d\n", __FUNCTION__, fHandle, pos, bufferSize)); uint32 blocksLeft = (bufferSize + offset + fBlockSize - 1) / fBlockSize; int32 totalBytesRead = 0; - //TRACE(("BIOS reads %lu bytes from %Ld (offset = %lu)\n", + //TRACE(("BIOS reads %lu bytes from %lld (offset = %lu)\n", // blocksLeft * fBlockSize, pos * fBlockSize, offset)); // read partial block @@ -730,7 +730,7 @@ FloppyDrive::FloppyDrive(int handle) TRACE((" cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE((" total sectors: %Ld\n", fParameters.sectors)); + TRACE((" total sectors: %lld\n", fParameters.sectors)); fBlockSize = 512; fSize = fParameters.sectors * fBlockSize; @@ -744,7 +744,7 @@ FloppyDrive::FloppyDrive(int handle) TRACE(("cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE(("total sectors: %Ld\n", fParameters.sectors)); + TRACE(("total sectors: %lld\n", fParameters.sectors)); fBlockSize = fParameters.bytes_per_sector; fSize = fParameters.sectors * fBlockSize; @@ -827,7 +827,7 @@ FloppyDrive::ReadBlocks(void *buffer, off_t first, int32 count) int sectorsPerTrack = fParameters.sectors_per_track; int heads = fParameters.heads; int32 ret; - //TRACE(("FloppyDrive::%s(%Ld,%ld) (%d)\n", __FUNCTION__, first, count, fHandle)); + //TRACE(("FloppyDrive::%s(%lld,%ld) (%d)\n", __FUNCTION__, first, count, fHandle)); // force single sector reads to avoid crossing track boundaries for (int i = 0; i < count; i++) { uint8 *buf = (uint8 *)buffer; @@ -901,7 +901,7 @@ BIOSDrive::BIOSDrive(int handle) TRACE((" cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE((" total sectors: %Ld\n", fParameters.sectors)); + TRACE((" total sectors: %lld\n", fParameters.sectors)); fBlockSize = 512; fSize = fParameters.sectors * fBlockSize; @@ -915,7 +915,7 @@ BIOSDrive::BIOSDrive(int handle) TRACE(("cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE(("total sectors: %Ld\n", fParameters.sectors)); + TRACE(("total sectors: %lld\n", fParameters.sectors)); fBlockSize = fParameters.bytes_per_sector; fSize = fParameters.sectors * fBlockSize; @@ -978,7 +978,7 @@ BIOSDrive::ReadBlocks(void *buffer, off_t first, int32 count) { int sectorsPerBlocks = (fBlockSize / 256); int32 ret; - TRACE(("BIOSDrive::%s(%Ld,%ld) (%d)\n", __FUNCTION__, first, count, fHandle)); + TRACE(("BIOSDrive::%s(%lld,%ld) (%d)\n", __FUNCTION__, first, count, fHandle)); // XXX: check for AHDI 3.0 before using long recno!!! ret = Rwabs(RW_READ | RW_NOTRANSLATE, buffer, sectorsPerBlocks, -1, fHandle, first * sectorsPerBlocks); if (ret < 0) @@ -1043,7 +1043,7 @@ XHDIDrive::XHDIDrive(int handle, uint16 major, uint16 minor) TRACE((" cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE((" total sectors: %Ld\n", fParameters.sectors)); + TRACE((" total sectors: %lld\n", fParameters.sectors)); fBlockSize = 512; fSize = fParameters.sectors * fBlockSize; @@ -1057,7 +1057,7 @@ XHDIDrive::XHDIDrive(int handle, uint16 major, uint16 minor) TRACE(("cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE(("total sectors: %Ld\n", fParameters.sectors)); + TRACE(("total sectors: %lld\n", fParameters.sectors)); fBlockSize = fParameters.bytes_per_sector; fSize = fParameters.sectors * fBlockSize; @@ -1105,7 +1105,7 @@ XHDIDrive::ReadBlocks(void *buffer, off_t first, int32 count) int sectorsPerBlock = (fBlockSize / 256); int32 ret; uint16 flags = RW_READ; - TRACE(("XHDIDrive::%s(%Ld, %d) (%d,%d)\n", __FUNCTION__, first, count, fMajor, fMinor)); + TRACE(("XHDIDrive::%s(%lld, %d) (%d,%d)\n", __FUNCTION__, first, count, fMajor, fMinor)); ret = XHReadWrite(fMajor, fMinor, flags, (uint32)first, (uint16)count, buffer); if (ret < 0) return xhdierror(ret); @@ -1181,7 +1181,7 @@ platform_add_boot_device(struct stage2_args *args, NodeList *devicesList) add_block_devices(devicesList, true); } - TRACE(("boot drive size: %Ld bytes\n", drive->Size())); + TRACE(("boot drive size: %lld bytes\n", drive->Size())); gBootVolume.SetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, gBootedFromImage); return B_OK; @@ -1195,12 +1195,12 @@ platform_get_boot_partitions(struct stage2_args *args, Node *bootDevice, BlockHandle *drive = static_cast(bootDevice); off_t offset = (off_t)gBootPartitionOffset * drive->BlockSize(); - dprintf("boot partition offset: %Ld\n", offset); + dprintf("boot partition offset: %lld\n", offset); NodeIterator iterator = list->GetIterator(); boot::Partition *partition = NULL; while ((partition = (boot::Partition *)iterator.Next()) != NULL) { - TRACE(("partition offset = %Ld, size = %Ld\n", partition->offset, partition->size)); + TRACE(("partition offset = %lld, size = %lld\n", partition->offset, partition->size)); // search for the partition that contains the partition // offset as reported by the BFS boot block if (offset >= partition->offset diff --git a/src/system/boot/platform/bios_ia32/devices.cpp b/src/system/boot/platform/bios_ia32/devices.cpp index 35a1b03d17..a6725ad3d8 100644 --- a/src/system/boot/platform/bios_ia32/devices.cpp +++ b/src/system/boot/platform/bios_ia32/devices.cpp @@ -502,7 +502,7 @@ find_unique_check_sums(NodeList *devices) disk.device.unknown.check_sums[i].offset = offset; disk.device.unknown.check_sums[i].sum = compute_check_sum(drive, offset); - TRACE(("disk %x, offset %Ld, sum %lu\n", drive->DriveID(), offset, + TRACE(("disk %x, offset %lld, sum %lu\n", drive->DriveID(), offset, disk.device.unknown.check_sums[i].sum)); } @@ -587,7 +587,7 @@ BIOSDrive::BIOSDrive(uint8 driveID) TRACE((" cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE((" total sectors: %Ld\n", fParameters.sectors)); + TRACE((" total sectors: %lld\n", fParameters.sectors)); fBlockSize = 512; fSize = fParameters.sectors * fBlockSize; @@ -601,7 +601,7 @@ BIOSDrive::BIOSDrive(uint8 driveID) TRACE(("cylinders: %lu, heads: %lu, sectors: %lu, bytes_per_sector: %u\n", fParameters.cylinders, fParameters.heads, fParameters.sectors_per_track, fParameters.bytes_per_sector)); - TRACE(("total sectors: %Ld\n", fParameters.sectors)); + TRACE(("total sectors: %lld\n", fParameters.sectors)); fBlockSize = fParameters.bytes_per_sector; fSize = fParameters.sectors * fBlockSize; @@ -632,7 +632,7 @@ BIOSDrive::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize) uint32 blocksLeft = (bufferSize + offset + fBlockSize - 1) / fBlockSize; int32 totalBytesRead = 0; - //TRACE(("BIOS reads %lu bytes from %Ld (offset = %lu), drive %u\n", + //TRACE(("BIOS reads %lu bytes from %lld (offset = %lu), drive %u\n", // blocksLeft * fBlockSize, pos * fBlockSize, offset, fDriveID)); uint32 scratchSize = 24 * 1024 / fBlockSize; @@ -713,7 +713,7 @@ BIOSDrive::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize) } if (!readWorked) { - dprintf("reading %ld bytes from drive %u failed at %Ld\n", + dprintf("reading %ld bytes from drive %u failed at %lld\n", blocksRead, fDriveID, pos); return B_ERROR; } @@ -869,7 +869,7 @@ platform_add_boot_device(struct stage2_args *args, NodeList *devicesList) add_block_devices(devicesList, true); } - TRACE(("boot drive size: %Ld bytes\n", drive->Size())); + TRACE(("boot drive size: %lld bytes\n", drive->Size())); gBootVolume.SetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, gBootedFromImage); return B_OK; @@ -883,12 +883,12 @@ platform_get_boot_partitions(struct stage2_args *args, Node *bootDevice, BIOSDrive *drive = static_cast(bootDevice); off_t offset = (off_t)gBootPartitionOffset * drive->BlockSize(); - dprintf("boot partition offset: %Ld\n", offset); + dprintf("boot partition offset: %lld\n", offset); NodeIterator iterator = list->GetIterator(); boot::Partition *partition = NULL; while ((partition = (boot::Partition *)iterator.Next()) != NULL) { - TRACE(("partition offset = %Ld, size = %Ld\n", partition->offset, partition->size)); + TRACE(("partition offset = %lld, size = %lld\n", partition->offset, partition->size)); // search for the partition that contains the partition // offset as reported by the BFS boot block if (offset >= partition->offset diff --git a/src/system/boot/platform/u-boot/arch/ppc/arch_cpu.cpp b/src/system/boot/platform/u-boot/arch/ppc/arch_cpu.cpp index dff416c268..6429b71884 100644 --- a/src/system/boot/platform/u-boot/arch/ppc/arch_cpu.cpp +++ b/src/system/boot/platform/u-boot/arch/ppc/arch_cpu.cpp @@ -126,7 +126,7 @@ enumerate_cpus(void) } gKernelArgs.arch_args.bus_frequency = busFrequency; } - TRACE((" bus clock frequency: %Ld\n", + TRACE((" bus clock frequency: %lld\n", gKernelArgs.arch_args.bus_frequency)); #if 0 diff --git a/src/system/kernel/arch/arm/arch_debug.cpp b/src/system/kernel/arch/arm/arch_debug.cpp index cb88e3fbfb..3e2a45ae94 100644 --- a/src/system/kernel/arch/arm/arch_debug.cpp +++ b/src/system/kernel/arch/arm/arch_debug.cpp @@ -174,7 +174,7 @@ print_demangled_call(const char* image, const char* symbol, addr_t args, case B_INT64_TYPE: value = read_function_argument_value(arg, valueKnown); if (valueKnown) - kprintf("int64: \33[34m%Ld\33[0m", value); + kprintf("int64: \33[34m%lld\33[0m", value); break; case B_INT32_TYPE: value = read_function_argument_value(arg, valueKnown); diff --git a/src/system/kernel/arch/x86/arch_debug.cpp b/src/system/kernel/arch/x86/arch_debug.cpp index 2ab6b2e5b0..bbdd62d62f 100644 --- a/src/system/kernel/arch/x86/arch_debug.cpp +++ b/src/system/kernel/arch/x86/arch_debug.cpp @@ -212,7 +212,7 @@ print_demangled_call(const char* image, const char* symbol, addr_t args, case B_INT64_TYPE: value = read_function_argument_value(arg, valueKnown); if (valueKnown) - kprintf("int64: \33[34m%Ld\33[0m", value); + kprintf("int64: \33[34m%lld\33[0m", value); break; case B_INT32_TYPE: value = read_function_argument_value(arg, valueKnown); diff --git a/src/system/kernel/cache/file_cache.cpp b/src/system/kernel/cache/file_cache.cpp index 0fcf611545..98a4f3c2a6 100644 --- a/src/system/kernel/cache/file_cache.cpp +++ b/src/system/kernel/cache/file_cache.cpp @@ -262,7 +262,7 @@ static inline void push_access(file_cache_ref* ref, off_t offset, generic_size_t bytes, bool isWrite) { - TRACE(("%p: push %Ld, %ld, %s\n", ref, offset, bytes, + TRACE(("%p: push %lld, %ld, %s\n", ref, offset, bytes, isWrite ? "write" : "read")); int32 index = ref->last_access_index; @@ -376,7 +376,7 @@ read_into_cache(file_cache_ref* ref, void* cookie, off_t offset, int32 pageOffset, addr_t buffer, size_t bufferSize, bool useBuffer, vm_page_reservation* reservation, size_t reservePages) { - TRACE(("read_into_cache(offset = %Ld, pageOffset = %ld, buffer = %#lx, " + TRACE(("read_into_cache(offset = %lld, pageOffset = %ld, buffer = %#lx, " "bufferSize = %lu\n", offset, pageOffset, buffer, bufferSize)); VMCache* cache = ref->cache; @@ -460,7 +460,7 @@ read_from_file(file_cache_ref* ref, void* cookie, off_t offset, int32 pageOffset, addr_t buffer, size_t bufferSize, bool useBuffer, vm_page_reservation* reservation, size_t reservePages) { - TRACE(("read_from_file(offset = %Ld, pageOffset = %ld, buffer = %#lx, " + TRACE(("read_from_file(offset = %lld, pageOffset = %ld, buffer = %#lx, " "bufferSize = %lu\n", offset, pageOffset, buffer, bufferSize)); if (!useBuffer) @@ -736,7 +736,7 @@ cache_io(void* _cacheRef, void* cookie, off_t offset, addr_t buffer, VMCache* cache = ref->cache; bool useBuffer = buffer != 0; - TRACE(("cache_io(ref = %p, offset = %Ld, buffer = %p, size = %lu, %s)\n", + TRACE(("cache_io(ref = %p, offset = %lld, buffer = %p, size = %lu, %s)\n", ref, offset, (void*)buffer, *_size, doWrite ? "write" : "read")); int32 pageOffset = offset & (B_PAGE_SIZE - 1); @@ -802,7 +802,7 @@ cache_io(void* _cacheRef, void* cookie, off_t offset, addr_t buffer, size_t bytesInPage = min_c(size_t(B_PAGE_SIZE - pageOffset), bytesLeft); - TRACE(("lookup page from offset %Ld: %p, size = %lu, pageOffset " + TRACE(("lookup page from offset %lld: %p, size = %lu, pageOffset " "= %lu\n", offset, page, bytesLeft, pageOffset)); if (page != NULL) { @@ -1040,7 +1040,7 @@ cache_prefetch(dev_t mountID, ino_t vnodeID, off_t offset, size_t size) { // ToDo: schedule prefetch - TRACE(("cache_prefetch(vnode %ld:%Ld)\n", mountID, vnodeID)); + TRACE(("cache_prefetch(vnode %ld:%lld)\n", mountID, vnodeID)); // get the vnode for the object, this also grabs a ref to it struct vnode* vnode; @@ -1138,7 +1138,7 @@ file_cache_init(void) extern "C" void* file_cache_create(dev_t mountID, ino_t vnodeID, off_t size) { - TRACE(("file_cache_create(mountID = %ld, vnodeID = %Ld, size = %Ld)\n", + TRACE(("file_cache_create(mountID = %ld, vnodeID = %lld, size = %lld)\n", mountID, vnodeID, size)); file_cache_ref* ref = new file_cache_ref; @@ -1254,7 +1254,7 @@ file_cache_set_size(void* _cacheRef, off_t newSize) { file_cache_ref* ref = (file_cache_ref*)_cacheRef; - TRACE(("file_cache_set_size(ref = %p, size = %Ld)\n", ref, newSize)); + TRACE(("file_cache_set_size(ref = %p, size = %lld)\n", ref, newSize)); if (ref == NULL) return B_OK; @@ -1300,7 +1300,7 @@ file_cache_read(void* _cacheRef, void* cookie, off_t offset, void* buffer, { file_cache_ref* ref = (file_cache_ref*)_cacheRef; - TRACE(("file_cache_read(ref = %p, offset = %Ld, buffer = %p, size = %lu)\n", + TRACE(("file_cache_read(ref = %p, offset = %lld, buffer = %p, size = %lu)\n", ref, offset, buffer, *_size)); // Bounds checking. We do this here so it applies to uncached I/O. @@ -1357,7 +1357,7 @@ file_cache_write(void* _cacheRef, void* cookie, off_t offset, status_t status = cache_io(ref, cookie, offset, (addr_t)const_cast(buffer), _size, true); - TRACE(("file_cache_write(ref = %p, offset = %Ld, buffer = %p, size = %lu)" + TRACE(("file_cache_write(ref = %p, offset = %lld, buffer = %p, size = %lu)" " = %ld\n", ref, offset, buffer, *_size, status)); return status; diff --git a/src/system/kernel/cache/file_map.cpp b/src/system/kernel/cache/file_map.cpp index 0e79bb5670..8aa17b22bf 100644 --- a/src/system/kernel/cache/file_map.cpp +++ b/src/system/kernel/cache/file_map.cpp @@ -278,7 +278,7 @@ FileMap::_Add(file_io_vec* vecs, size_t vecCount, off_t& lastOffset) #ifdef TRACE_FILE_MAP for (uint32 i = 0; i < fCount; i++) { file_extent* extent = ExtentAt(i); - TRACE("[%ld] extent offset %Ld, disk offset %Ld, length %Ld\n", + TRACE("[%ld] extent offset %lld, disk offset %lld, length %lld\n", i, extent->offset, extent->disk.offset, extent->disk.length); } #endif @@ -602,7 +602,7 @@ file_map_init(void) extern "C" void* file_map_create(dev_t mountID, ino_t vnodeID, off_t size) { - TRACE("file_map_create(mountID = %ld, vnodeID = %Ld, size = %Ld)\n", + TRACE("file_map_create(mountID = %ld, vnodeID = %lld, size = %lld)\n", mountID, vnodeID, size); // Get the vnode for the object @@ -664,7 +664,7 @@ extern "C" status_t file_map_translate(void* _map, off_t offset, size_t size, file_io_vec* vecs, size_t* _count, size_t align) { - TRACE("file_map_translate(map %p, offset %Ld, size %ld)\n", + TRACE("file_map_translate(map %p, offset %lld, size %ld)\n", _map, offset, size); FileMap* map = (FileMap*)_map; diff --git a/src/system/kernel/device_manager/devfs.cpp b/src/system/kernel/device_manager/devfs.cpp index d0659f9ba1..090016419e 100644 --- a/src/system/kernel/device_manager/devfs.cpp +++ b/src/system/kernel/device_manager/devfs.cpp @@ -1215,7 +1215,7 @@ devfs_read(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, off_t pos, struct devfs_vnode* vnode = (struct devfs_vnode*)_vnode->private_node; struct devfs_cookie* cookie = (struct devfs_cookie*)_cookie; - //TRACE(("devfs_read: vnode %p, cookie %p, pos %Ld, len %p\n", + //TRACE(("devfs_read: vnode %p, cookie %p, pos %lld, len %p\n", // vnode, cookie, pos, _length)); if (!S_ISCHR(vnode->stream.type)) @@ -1248,7 +1248,7 @@ devfs_write(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, off_t pos, struct devfs_vnode* vnode = (struct devfs_vnode*)_vnode->private_node; struct devfs_cookie* cookie = (struct devfs_cookie*)_cookie; - //TRACE(("devfs_write: vnode %p, cookie %p, pos %Ld, len %p\n", + //TRACE(("devfs_write: vnode %p, cookie %p, pos %lld, len %p\n", // vnode, cookie, pos, _length)); if (!S_ISCHR(vnode->stream.type)) @@ -1672,7 +1672,7 @@ devfs_read_pages(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, struct devfs_vnode* vnode = (devfs_vnode*)_vnode->private_node; struct devfs_cookie* cookie = (struct devfs_cookie*)_cookie; - //TRACE(("devfs_read_pages: vnode %p, vecs %p, count = %lu, pos = %Ld, size = %lu\n", vnode, vecs, count, pos, *_numBytes)); + //TRACE(("devfs_read_pages: vnode %p, vecs %p, count = %lu, pos = %lld, size = %lu\n", vnode, vecs, count, pos, *_numBytes)); if (!S_ISCHR(vnode->stream.type) || (!vnode->stream.u.dev.device->HasRead() @@ -1731,7 +1731,7 @@ devfs_write_pages(fs_volume* _volume, fs_vnode* _vnode, void* _cookie, struct devfs_vnode* vnode = (devfs_vnode*)_vnode->private_node; struct devfs_cookie* cookie = (struct devfs_cookie*)_cookie; - //TRACE(("devfs_write_pages: vnode %p, vecs %p, count = %lu, pos = %Ld, size = %lu\n", vnode, vecs, count, pos, *_numBytes)); + //TRACE(("devfs_write_pages: vnode %p, vecs %p, count = %lu, pos = %lld, size = %lu\n", vnode, vecs, count, pos, *_numBytes)); if (!S_ISCHR(vnode->stream.type) || (!vnode->stream.u.dev.device->HasWrite() diff --git a/src/system/kernel/fs/node_monitor.cpp b/src/system/kernel/fs/node_monitor.cpp index f37081d917..a00f7f0d6b 100644 --- a/src/system/kernel/fs/node_monitor.cpp +++ b/src/system/kernel/fs/node_monitor.cpp @@ -304,7 +304,7 @@ NodeMonitorService::_RemoveListener(io_context *context, dev_t device, ino_t node, NotificationListener& notificationListener, bool isVolumeListener) { - TRACE(("%s(dev = %ld, node = %Ld, listener = %p\n", + TRACE(("%s(dev = %ld, node = %lld, listener = %p\n", __PRETTY_FUNCTION__, device, node, ¬ificationListener)); RecursiveLocker _(fRecursiveLock); @@ -469,7 +469,7 @@ status_t NodeMonitorService::AddListener(io_context *context, dev_t device, ino_t node, uint32 flags, NotificationListener& notificationListener) { - TRACE(("%s(dev = %ld, node = %Ld, flags = %ld, listener = %p\n", + TRACE(("%s(dev = %ld, node = %lld, flags = %ld, listener = %p\n", __PRETTY_FUNCTION__, device, node, flags, ¬ificationListener)); RecursiveLocker _(fRecursiveLock); @@ -491,7 +491,7 @@ NodeMonitorService::_UpdateListener(io_context *context, dev_t device, ino_t node, uint32 flags, bool addFlags, NotificationListener& notificationListener) { - TRACE(("%s(dev = %ld, node = %Ld, flags = %ld, listener = %p\n", + TRACE(("%s(dev = %ld, node = %lld, flags = %ld, listener = %p\n", __PRETTY_FUNCTION__, device, node, flags, ¬ificationListener)); RecursiveLocker _(fRecursiveLock); @@ -898,7 +898,7 @@ inline status_t NodeMonitorService::NotifyMount(dev_t device, dev_t parentDevice, ino_t parentDirectory) { - TRACE(("mounted device: %ld, parent %ld:%Ld\n", device, parentDevice, + TRACE(("mounted device: %ld, parent %ld:%lld\n", device, parentDevice, parentDirectory)); RecursiveLocker locker(fRecursiveLock); @@ -1000,7 +1000,7 @@ status_t NodeMonitorService::RemoveListener(io_context *context, dev_t device, ino_t node, NotificationListener& notificationListener) { - TRACE(("%s(dev = %ld, node = %Ld, listener = %p\n", + TRACE(("%s(dev = %ld, node = %lld, listener = %p\n", __PRETTY_FUNCTION__, device, node, ¬ificationListener)); RecursiveLocker _(fRecursiveLock); @@ -1048,7 +1048,7 @@ status_t NodeMonitorService::UpdateUserListener(io_context *context, dev_t device, ino_t node, uint32 flags, UserNodeListener& userListener) { - TRACE(("%s(dev = %ld, node = %Ld, flags = %ld, listener = %p\n", + TRACE(("%s(dev = %ld, node = %lld, flags = %ld, listener = %p\n", __PRETTY_FUNCTION__, device, node, flags, &userListener)); RecursiveLocker _(fRecursiveLock); diff --git a/src/system/kernel/fs/rootfs.cpp b/src/system/kernel/fs/rootfs.cpp index e835dbf3b6..1cfb42e03c 100644 --- a/src/system/kernel/fs/rootfs.cpp +++ b/src/system/kernel/fs/rootfs.cpp @@ -523,7 +523,7 @@ rootfs_get_vnode(fs_volume* _volume, ino_t id, fs_vnode* _vnode, int* _type, struct rootfs* fs = (struct rootfs*)_volume->private_volume; struct rootfs_vnode* vnode; - TRACE(("rootfs_getvnode: asking for vnode %Ld, r %d\n", id, reenter)); + TRACE(("rootfs_getvnode: asking for vnode %lld, r %d\n", id, reenter)); if (!reenter) rw_lock_read_lock(&fs->lock); diff --git a/src/system/kernel/module.cpp b/src/system/kernel/module.cpp index 1f02be10f6..07d159402c 100644 --- a/src/system/kernel/module.cpp +++ b/src/system/kernel/module.cpp @@ -1369,7 +1369,7 @@ ModuleNotificationService::_AddNode(dev_t device, ino_t node, const char* path, return status; } - //dprintf(" add %s %ld:%Ld (%s)\n", flags == B_WATCH_DIRECTORY + //dprintf(" add %s %ld:%lld (%s)\n", flags == B_WATCH_DIRECTORY // ? "dir" : "file", device, node, path); entry->device = device; diff --git a/src/system/kernel/real_time_clock.cpp b/src/system/kernel/real_time_clock.cpp index 1dca7eeb87..6b0eeb39a7 100644 --- a/src/system/kernel/real_time_clock.cpp +++ b/src/system/kernel/real_time_clock.cpp @@ -258,7 +258,7 @@ _user_set_timezone(int32 timezoneOffset, const char *name, size_t nameLength) if (geteuid() != 0) return B_NOT_ALLOWED; - TRACE(("old system_time_offset %Ld old %Ld new %Ld gmt %d\n", + TRACE(("old system_time_offset %lld old %lld new %lld gmt %d\n", arch_rtc_get_system_time_offset(sRealTimeData), sTimezoneOffset, offset, sIsGMT)); @@ -285,7 +285,7 @@ _user_set_timezone(int32 timezoneOffset, const char *name, size_t nameLength) sTimezoneOffset = offset; - TRACE(("new system_time_offset %Ld\n", + TRACE(("new system_time_offset %lld\n", arch_rtc_get_system_time_offset(sRealTimeData))); return B_OK; diff --git a/src/system/kernel/vm/VMCache.cpp b/src/system/kernel/vm/VMCache.cpp index 55155525de..1e8a27b9d9 100644 --- a/src/system/kernel/vm/VMCache.cpp +++ b/src/system/kernel/vm/VMCache.cpp @@ -1208,7 +1208,7 @@ VMCache::Resize(off_t newSize, int priority) status_t VMCache::Rebase(off_t newBase, int priority) { - TRACE(("VMCache::Rebase(cache %p, newBase %Ld) old base %Ld\n", + TRACE(("VMCache::Rebase(cache %p, newBase %lld) old base %lld\n", this, newBase, this->virtual_base)); this->AssertLocked(); diff --git a/src/system/libroot/os/parsedate.cpp b/src/system/libroot/os/parsedate.cpp index 5db3fe0259..389460e754 100644 --- a/src/system/libroot/os/parsedate.cpp +++ b/src/system/libroot/os/parsedate.cpp @@ -934,7 +934,7 @@ parsedate_etc(const char* dateString, time_t now, int* _flags) parsed_element e = elements[index]; printf(" %ld: type = %u, base_type = %u, unit = %u, flags = %u, " - "modifier = %u, value = %Ld (%s)\n", index, e.type, e.base_type, + "modifier = %u, value = %lld (%s)\n", index, e.type, e.base_type, e.unit, e.flags, e.modifier, e.value, e.value_type == VALUE_NUMERICAL ? "numerical" : (e.value_type == VALUE_STRING ? "string" : "char")); diff --git a/src/system/libroot/posix/pwd_query.c b/src/system/libroot/posix/pwd_query.c index 1fe7f57a53..56bec1fbe4 100644 --- a/src/system/libroot/posix/pwd_query.c +++ b/src/system/libroot/posix/pwd_query.c @@ -115,7 +115,7 @@ struct pw_tls *get_pw_tls(void) int dentopen(struct dirent *dent, char *path) { int err; - PRINT(("%s({%ld, %Ld, %ld, %Ld, %s}, )\n", __FUNCTION__, dent->d_pdev, dent->d_pino, dent->d_dev, dent->d_ino, dent->d_name)); + PRINT(("%s({%ld, %lld, %ld, %lld, %s}, )\n", __FUNCTION__, dent->d_pdev, dent->d_pino, dent->d_dev, dent->d_ino, dent->d_name)); dent->d_dev = boot_device; err = get_path_for_dirent(dent, path, B_PATH_NAME_LENGTH); if ((err < 0) || (path[0] != '/')) { diff --git a/src/tests/add-ons/kernel/drivers/audio/multi_audio_test.cpp b/src/tests/add-ons/kernel/drivers/audio/multi_audio_test.cpp index 3a735442a6..bedbacd584 100644 --- a/src/tests/add-ons/kernel/drivers/audio/multi_audio_test.cpp +++ b/src/tests/add-ons/kernel/drivers/audio/multi_audio_test.cpp @@ -408,7 +408,7 @@ do_play(int argc, char** argv) exchanged++; } - printf("%ld buffers exchanged while playing (%lu frames played (%Ld)).\n", + printf("%ld buffers exchanged while playing (%lu frames played (%lld)).\n", exchanged, x, bufferInfo.played_frames_count); // clear buffers diff --git a/src/tests/add-ons/kernel/file_systems/bfs/array/array.cpp b/src/tests/add-ons/kernel/file_systems/bfs/array/array.cpp index 738f302225..dd18ec143b 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/array/array.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/array/array.cpp @@ -58,7 +58,7 @@ main(int argc,char **argv) sorted_array *array = gArray.Array(); for (int32 i = 0;i < array->count;i++) { if (!gList.HasItem((void *)array->values[i])) { - printf("Could not find entry %Ld at %ld in list!\n",array->values[i],i); + printf("Could not find entry %lld at %ld in list!\n",array->values[i],i); dumpArray(); } } diff --git a/src/tests/add-ons/kernel/file_systems/bfs/btree/test.cpp b/src/tests/add-ons/kernel/file_systems/bfs/btree/test.cpp index 97d052eeaa..c6b6b36785 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/btree/test.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/btree/test.cpp @@ -115,7 +115,7 @@ dumpKey(void* key, int32 length) printf("%lu", *(uint32*)key); break; case S_LONG_LONG_INDEX: - printf("%Ld", *(int64*)key); + printf("%lld", *(int64*)key); break; case S_ULONG_LONG_INDEX: printf("%Lu", *(uint64*)key); @@ -335,19 +335,19 @@ checkTreeContents(BPlusTree* tree) &value, &duplicate)) == B_OK) { if (value < 0 || value >= gNum) { iterator.Dump(); - printf("\ninvalid value %Ld in tree: ", value); + printf("\ninvalid value %lld in tree: ", value); bailOutWithKey(key, length); } if (gKeys[value].value != value) { iterator.Dump(); - printf("\nkey pointing to the wrong value %Ld (should be %Ld)\n", + printf("\nkey pointing to the wrong value %lld (should be %lld)\n", value, gKeys[value].value); bailOutWithKey(key, length); } if (length != gKeys[value].length || memcmp(key, gKeys[value].data, length)) { iterator.Dump(); - printf("\nkeys don't match (key index = %Ld, %ld times in tree, " + printf("\nkeys don't match (key index = %lld, %ld times in tree, " "%ld. occassion):\n\tfound: ", value, gKeys[value].in, gKeys[value].count + 1); dumpKey(key, length); diff --git a/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp b/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp index 42e99cbecd..5c84a2282a 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp @@ -121,7 +121,7 @@ dumpLogEntry(int device, disk_super_block &superBlock, int32 &start, uint8 *bloc + blockStart++ % superBlock.log_blocks.Length(); if (read_pos(device, blockNumber << superBlock.BlockShift(), block, blockSize) != blockSize) { - fprintf(stderr, "%s: could not read block %Ld.\n", sProgramName, blockNumber); + fprintf(stderr, "%s: could not read block %lld.\n", sProgramName, blockNumber); exit(-1); } @@ -136,7 +136,7 @@ dumpLogEntry(int device, disk_super_block &superBlock, int32 &start, uint8 *bloc start += arrayBlocks + count; - printf("Entry %ld contains %Ld blocks (entry starts at block %Ld):\n", entry, count, blockNumber); + printf("Entry %ld contains %lld blocks (entry starts at block %lld):\n", entry, count, blockNumber); first = false; } else indexOffset += arraySize; @@ -147,7 +147,7 @@ dumpLogEntry(int device, disk_super_block &superBlock, int32 &start, uint8 *bloc break; off_t value = array[arrayIndex]; - printf("%7ld: %Ld%s\n", index, value, value == 0 ? " (superblock)" : + printf("%7ld: %lld%s\n", index, value, value == 0 ? " (superblock)" : value < bitmapSize + 1 ? " (bitmap block)" : ""); if (data != NULL) { @@ -155,7 +155,7 @@ dumpLogEntry(int device, disk_super_block &superBlock, int32 &start, uint8 *bloc + ((dataStart + index) % superBlock.log_blocks.Length()); if (read_pos(device, blockNumber << superBlock.BlockShift(), data, blockSize) != blockSize) { - fprintf(stderr, "%s: could not read block %Ld.\n", sProgramName, blockNumber); + fprintf(stderr, "%s: could not read block %lld.\n", sProgramName, blockNumber); } else dumpBlock((char *)data, blockSize); } @@ -223,7 +223,7 @@ main(int argc, char **argv) } off_t bitmapSize = superBlock.AllocationGroups() * superBlock.BlocksPerAllocationGroup(); - printf("Log area = (%Ld - %Ld), current start = %Ld, end = %Ld, %Ld bitmap blocks\n", + printf("Log area = (%lld - %lld), current start = %lld, end = %lld, %lld bitmap blocks\n", toBlock(superBlock, superBlock.log_blocks), toBlock(superBlock, superBlock.log_blocks) + superBlock.log_blocks.Length(), superBlock.LogStart(), superBlock.LogEnd(), bitmapSize); diff --git a/src/tests/add-ons/kernel/file_systems/consistency_check/consistency_check.cpp b/src/tests/add-ons/kernel/file_systems/consistency_check/consistency_check.cpp index 0a4f2c09f1..9dae969f2b 100644 --- a/src/tests/add-ons/kernel/file_systems/consistency_check/consistency_check.cpp +++ b/src/tests/add-ons/kernel/file_systems/consistency_check/consistency_check.cpp @@ -127,7 +127,7 @@ process_file(const file_entry& entry, int number) } if (stat.st_ino != entry.node) { - fprintf(stderr, "\"%s\": inode changed from %Ld to %Ld\n", + fprintf(stderr, "\"%s\": inode changed from %lld to %lld\n", entry.path.c_str(), entry.node, stat.st_ino); } diff --git a/src/tests/add-ons/kernel/file_systems/random_read/random_read.cpp b/src/tests/add-ons/kernel/file_systems/random_read/random_read.cpp index d86dd43791..cc91a97677 100644 --- a/src/tests/add-ons/kernel/file_systems/random_read/random_read.cpp +++ b/src/tests/add-ons/kernel/file_systems/random_read/random_read.cpp @@ -96,10 +96,10 @@ readTest(const char *name, int32 loops) ssize_t bytesRead = file.ReadAt(pos, buffer, bytes); if (bytesRead < B_OK) { - printf(" Could not read %ld bytes at offset %Ld: %s\n", + printf(" Could not read %ld bytes at offset %lld: %s\n", bytes, pos, strerror(bytesRead)); } else if (bytesRead != max) { - printf(" Could only read %ld bytes instead of %ld at offset %Ld\n", + printf(" Could only read %ld bytes instead of %ld at offset %lld\n", bytesRead, bytes, pos); } @@ -126,7 +126,7 @@ readTest(const char *name, int32 loops) break; } if (!correct) { - printf("[%Ld,%ld] Bytes at %Ld don't match (partial begin = " + printf("[%lld,%ld] Bytes at %lld don't match (partial begin = " "%ld, should be %08lx, is %08lx)!\n", pos, bytes, bufferPos, partial, num, read); faults++; @@ -144,7 +144,7 @@ readTest(const char *name, int32 loops) return; } if (num != *numBuffer) { - printf("[%Ld,%ld] Bytes at %Ld don't match (should be %08lx, " + printf("[%lld,%ld] Bytes at %lld don't match (should be %08lx, " "is %08lx)!\n", pos, bytes, bufferPos, num, *numBuffer); faults++; } @@ -170,7 +170,7 @@ readTest(const char *name, int32 loops) break; } if (!correct) { - printf("[%Ld,%ld] Bytes at %Ld don't match (partial end = " + printf("[%lld,%ld] Bytes at %lld don't match (partial end = " "%ld, should be %08lx, is %08lx)!\n", pos, bytes, bufferPos, partial, num, read); faults++; diff --git a/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp b/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp index ba28abb133..c8c24be8d9 100644 --- a/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp +++ b/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp @@ -26,6 +26,6 @@ devfs_publish_partition(const char *path, const partition_info *info) if (info == NULL) return B_BAD_VALUE; - printf("publish partition: %s (device \"%s\", size %Ld)\n", path, info->device, info->size); + printf("publish partition: %s (device \"%s\", size %lld)\n", path, info->device, info->size); return B_OK; } diff --git a/src/tests/add-ons/media/plugins/musepack/main.cpp b/src/tests/add-ons/media/plugins/musepack/main.cpp index c37ad11fc0..d876896034 100644 --- a/src/tests/add-ons/media/plugins/musepack/main.cpp +++ b/src/tests/add-ons/media/plugins/musepack/main.cpp @@ -98,7 +98,7 @@ main(int argc, char *argv[]) i, status, strerror(status)); goto err; } - TRACE("main: GetStreamInfo(stream = %d) result: %Ld frames, %.6f sec\n", + TRACE("main: GetStreamInfo(stream = %d) result: %lld frames, %.6f sec\n", i, frameCount, duration / 1000000.0); } @@ -122,25 +122,25 @@ main(int argc, char *argv[]) TRACE("main: calling Seek(stream = %d, time %.6f forward)\n", i, time / 1000000.0); status = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_TIME | B_MEDIA_SEEK_CLOSEST_FORWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); frame = 1000; - TRACE("main: calling Seek(stream = %d, frame %Ld forward)\n", i, frame); + TRACE("main: calling Seek(stream = %d, frame %lld forward)\n", i, frame); status = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_FRAME | B_MEDIA_SEEK_CLOSEST_FORWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); time = 1000000; // 1 sec TRACE("main: calling Seek(stream = %d, time %.6f backward)\n", i, time / 1000000.0); status = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_TIME | B_MEDIA_SEEK_CLOSEST_BACKWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); frame = 1000; - TRACE("main: calling Seek(stream = %d, frame %Ld backward)\n", i, frame); + TRACE("main: calling Seek(stream = %d, frame %lld backward)\n", i, frame); status = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_FRAME | B_MEDIA_SEEK_CLOSEST_BACKWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); } for (int i = 0; i < streamCount; i++) { diff --git a/src/tests/kits/media/mp3_reader_test/main.cpp b/src/tests/kits/media/mp3_reader_test/main.cpp index 13fc5709bd..a9371084c7 100644 --- a/src/tests/kits/media/mp3_reader_test/main.cpp +++ b/src/tests/kits/media/mp3_reader_test/main.cpp @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) TRACE("main: GetStreamInfo(stream = %d) failed with error %lx (%s)\n", i, s, strerror(s)); goto err; } - TRACE("main: GetStreamInfo(stream = %d) result: %Ld frames, %.6f sec\n", i, frameCount, duration / 1000000.0); + TRACE("main: GetStreamInfo(stream = %d) result: %lld frames, %.6f sec\n", i, frameCount, duration / 1000000.0); } for (int i = 0; i < streamCount; i++) { @@ -104,22 +104,22 @@ int main(int argc, char *argv[]) time = 1000000; // 1 sec TRACE("main: calling Seek(stream = %d, time %.6f forward)\n", i, time / 1000000.0); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_TIME | B_MEDIA_SEEK_CLOSEST_FORWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); frame = 1000; - TRACE("main: calling Seek(stream = %d, frame %Ld forward)\n", i, frame); + TRACE("main: calling Seek(stream = %d, frame %lld forward)\n", i, frame); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_FRAME | B_MEDIA_SEEK_CLOSEST_FORWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); time = 1000000; // 1 sec TRACE("main: calling Seek(stream = %d, time %.6f backward)\n", i, time / 1000000.0); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_TIME | B_MEDIA_SEEK_CLOSEST_BACKWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); frame = 1000; - TRACE("main: calling Seek(stream = %d, frame %Ld backward)\n", i, frame); + TRACE("main: calling Seek(stream = %d, frame %lld backward)\n", i, frame); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_FRAME | B_MEDIA_SEEK_CLOSEST_BACKWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); } for (int i = 0; i < streamCount; i++) { diff --git a/src/tests/kits/media/wav_reader_test/main.cpp b/src/tests/kits/media/wav_reader_test/main.cpp index 708ee0e276..dd8127afda 100644 --- a/src/tests/kits/media/wav_reader_test/main.cpp +++ b/src/tests/kits/media/wav_reader_test/main.cpp @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) TRACE("main: GetStreamInfo(stream = %d) failed with error %lx (%s)\n", i, s, strerror(s)); goto err; } - TRACE("main: GetStreamInfo(stream = %d) result: %Ld frames, %.6f sec\n", i, frameCount, duration / 1000000.0); + TRACE("main: GetStreamInfo(stream = %d) result: %lld frames, %.6f sec\n", i, frameCount, duration / 1000000.0); } for (int i = 0; i < streamCount; i++) { @@ -104,22 +104,22 @@ int main(int argc, char *argv[]) time = 1000000; // 1 sec TRACE("main: calling Seek(stream = %d, time %.6f forward)\n", i, time / 1000000.0); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_TIME | B_MEDIA_SEEK_CLOSEST_FORWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); frame = 1000; - TRACE("main: calling Seek(stream = %d, frame %Ld forward)\n", i, frame); + TRACE("main: calling Seek(stream = %d, frame %lld forward)\n", i, frame); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_FRAME | B_MEDIA_SEEK_CLOSEST_FORWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); time = 1000000; // 1 sec TRACE("main: calling Seek(stream = %d, time %.6f backward)\n", i, time / 1000000.0); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_TIME | B_MEDIA_SEEK_CLOSEST_BACKWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); frame = 1000; - TRACE("main: calling Seek(stream = %d, frame %Ld backward)\n", i, frame); + TRACE("main: calling Seek(stream = %d, frame %lld backward)\n", i, frame); s = reader->Seek(cookies[i], B_MEDIA_SEEK_TO_FRAME | B_MEDIA_SEEK_CLOSEST_BACKWARD, &frame, &time); - TRACE("main: Seek result: time %.6f, frame %Ld\n", time / 1000000.0, frame); + TRACE("main: Seek result: time %.6f, frame %lld\n", time / 1000000.0, frame); } for (int i = 0; i < streamCount; i++) { diff --git a/src/tests/kits/storage/BasicTest.cpp b/src/tests/kits/storage/BasicTest.cpp index d52d4bd009..0e83817fd3 100644 --- a/src/tests/kits/storage/BasicTest.cpp +++ b/src/tests/kits/storage/BasicTest.cpp @@ -75,7 +75,7 @@ BasicTest::dumpStat(struct stat &st) printf(" st_nlink : %x\n", st.st_nlink); printf(" st_uid : %x\n", st.st_uid); printf(" st_gid : %x\n", st.st_gid); - printf(" st_size : %Ld\n", st.st_size); + printf(" st_size : %lld\n", st.st_size); printf(" st_blksize: %ld\n", st.st_blksize); printf(" st_atime : %lx\n", st.st_atime); printf(" st_mtime : %lx\n", st.st_mtime); diff --git a/src/tests/kits/storage/MimeTypeTest.cpp b/src/tests/kits/storage/MimeTypeTest.cpp index 59edc0e0ac..9f13892958 100644 --- a/src/tests/kits/storage/MimeTypeTest.cpp +++ b/src/tests/kits/storage/MimeTypeTest.cpp @@ -607,7 +607,7 @@ dump_ref(entry_ref *ref, char* name = "ref") { printf("%s == '%s'", name, path.Path()); } else printf("%s == ERROR", name); - printf(" == (%ld, %Ld, '%s')\n", ref->device, ref->directory, ref->name); + printf(" == (%ld, %lld, '%s')\n", ref->device, ref->directory, ref->name); } else printf("%s == (NULL)\n", name); diff --git a/src/tests/kits/storage/testapps/NodeMonitorTest.cpp b/src/tests/kits/storage/testapps/NodeMonitorTest.cpp index 8784d48935..ac67a80d97 100644 --- a/src/tests/kits/storage/testapps/NodeMonitorTest.cpp +++ b/src/tests/kits/storage/testapps/NodeMonitorTest.cpp @@ -66,7 +66,7 @@ main() return -1; } - //printf("device: %ld, node: %Ld\n", nodeRef.device, nodeRef.node); + //printf("device: %ld, node: %lld\n", nodeRef.device, nodeRef.node); // start looper Looper& looper = *new Looper(nodeRef); diff --git a/src/tests/kits/storage/virtualdrive/mkvirtualdrive.cpp b/src/tests/kits/storage/virtualdrive/mkvirtualdrive.cpp index bd9fdd7c01..995989f04b 100644 --- a/src/tests/kits/storage/virtualdrive/mkvirtualdrive.cpp +++ b/src/tests/kits/storage/virtualdrive/mkvirtualdrive.cpp @@ -199,7 +199,7 @@ info_for_device(const char *device) * info.geometry.sectors_per_track * info.geometry.cylinder_count * info.geometry.head_count; - printf("\tdisk size is %Ld bytes (%g MB)\n", size, size / (1024.0 * 1024)); + printf("\tdisk size is %lld bytes (%g MB)\n", size, size / (1024.0 * 1024)); if (info.halted) printf("\tdevice is currently halted.\n"); } diff --git a/src/tests/servers/app/idle_test/test.cpp b/src/tests/servers/app/idle_test/test.cpp index 5cd627c307..aaf457b6f3 100644 --- a/src/tests/servers/app/idle_test/test.cpp +++ b/src/tests/servers/app/idle_test/test.cpp @@ -5,6 +5,6 @@ int main() { BApplication app("application/x-vnd.idle-test"); - printf("idle_time() : %Ld\n", idle_time()); + printf("idle_time() : %lld\n", idle_time()); } diff --git a/src/tests/system/boot/loader/Handle.cpp b/src/tests/system/boot/loader/Handle.cpp index 8cd9380d50..1f6de996b9 100644 --- a/src/tests/system/boot/loader/Handle.cpp +++ b/src/tests/system/boot/loader/Handle.cpp @@ -84,7 +84,7 @@ Handle::SetTo(int handle, bool takeOwnership) ssize_t Handle::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize) { - //printf("Handle::ReadAt(pos = %Ld, buffer = %p, size = %lu)\n", pos, buffer, bufferSize); + //printf("Handle::ReadAt(pos = %lld, buffer = %p, size = %lu)\n", pos, buffer, bufferSize); return read_pos(fHandle, pos, buffer, bufferSize); } diff --git a/src/tests/system/kernel/advisory_locking_test.cpp b/src/tests/system/kernel/advisory_locking_test.cpp index bea79922a5..68c643c67f 100644 --- a/src/tests/system/kernel/advisory_locking_test.cpp +++ b/src/tests/system/kernel/advisory_locking_test.cpp @@ -28,7 +28,7 @@ type_name(int type) int do_lock(int fd, int type, off_t start, off_t length) { - printf("%s lock %Ld:%Ld\n", type_name(type), start, length); + printf("%s lock %lld:%lld\n", type_name(type), start, length); struct flock flock; flock.l_type = type; @@ -36,7 +36,7 @@ do_lock(int fd, int type, off_t start, off_t length) flock.l_start = start; flock.l_len = length; if (fcntl(fd, F_SETLK, &flock) != 0) { - fprintf(stderr, "ERROR: %s lock %Ld:%Ld failed: %s\n", type_name(type), + fprintf(stderr, "ERROR: %s lock %lld:%lld failed: %s\n", type_name(type), start, length, strerror(errno)); return -1; } diff --git a/src/tests/system/kernel/cache/block_cache_test.cpp b/src/tests/system/kernel/cache/block_cache_test.cpp index 561f6ec52e..474794cd37 100644 --- a/src/tests/system/kernel/cache/block_cache_test.cpp +++ b/src/tests/system/kernel/cache/block_cache_test.cpp @@ -25,10 +25,10 @@ #define TEST_BLOCK_DATA(block, number, type) \ if ((block)->type ## _data != NULL && gBlocks[(number)]. type == 0) \ - error(line, "Block %Ld: " #type " should be NULL!", (number)); \ + error(line, "Block %lld: " #type " should be NULL!", (number)); \ if ((block)->type ## _data != NULL && gBlocks[(number)]. type != 0 \ && *(int32*)(block)->type ## _data != gBlocks[(number)]. type) { \ - error(line, "Block %Ld: " #type " wrong (0x%lx should be 0x%lx)!", \ + error(line, "Block %lld: " #type " wrong (0x%lx should be 0x%lx)!", \ (number), *(int32*)(block)->type ## _data, \ gBlocks[(number)]. type); \ } @@ -192,14 +192,14 @@ test_blocks(off_t number, int32 count, int32 line) cached_block* block = (cached_block*)hash_lookup(gCache->hash, &number); if (block == NULL) { if (gBlocks[number].present) - error(line, "Block %Ld not found!", number); + error(line, "Block %lld not found!", number); continue; } if (!gBlocks[number].present) - error(line, "Block %Ld is present, but should not!", number); + error(line, "Block %lld is present, but should not!", number); if (block->is_dirty != gBlocks[number].is_dirty) { - error(line, "Block %Ld: dirty bit differs (is %d should be %d)!", + error(line, "Block %lld: dirty bit differs (is %d should be %d)!", number, block->is_dirty, gBlocks[number].is_dirty); } #if 0 @@ -209,11 +209,11 @@ test_blocks(off_t number, int32 count, int32 line) } #endif if (block->discard != gBlocks[number].discard) { - error(line, "Block %Ld: discard bit differs (is %d should be %d)!", + error(line, "Block %lld: discard bit differs (is %d should be %d)!", number, block->discard, gBlocks[number].discard); } if (gBlocks[number].write && !gBlocks[number].written) - error(line, "Block %Ld: has not been written yet!", number); + error(line, "Block %lld: has not been written yet!", number); TEST_BLOCK_DATA(block, number, current); TEST_BLOCK_DATA(block, number, original); diff --git a/src/tests/system/kernel/cache/pages_io_test.cpp b/src/tests/system/kernel/cache/pages_io_test.cpp index da018b3ffe..9e4d8c578e 100644 --- a/src/tests/system/kernel/cache/pages_io_test.cpp +++ b/src/tests/system/kernel/cache/pages_io_test.cpp @@ -143,7 +143,7 @@ file_map::Add(file_io_vec *vecs, size_t vecCount, off_t &lastOffset) #ifdef TRACE_FILE_CACHE for (uint32 i = 0; i < count; i++) { file_extent *extent = ExtentAt(i); - dprintf(" [%ld] extend offset %Ld, disk offset %Ld, length %Ld\n", + dprintf(" [%ld] extend offset %lld, disk offset %lld, length %lld\n", i, extent->offset, extent->disk.offset, extent->disk.length); } #endif @@ -255,7 +255,7 @@ vfs_get_file_map(void *vnode, off_t offset, size_t size, file_io_vec *vecs, size_t max = *_count; uint32 index = 0; - printf("vfs_get_file_map(offset = %Ld, size = %lu, count = %lu)\n", + printf("vfs_get_file_map(offset = %lld, size = %lu, count = %lu)\n", offset, size, *_count); while (true) { @@ -296,7 +296,7 @@ static status_t vfs_read_pages(void *device, void *cookie, off_t offset, const iovec *vecs, size_t count, size_t *bytes, bool kernel) { - printf("read offset %Ld, length %lu\n", offset, *bytes); + printf("read offset %lld, length %lu\n", offset, *bytes); for (uint32 i = 0; i < count; i++) { printf(" [%lu] base %lu, length %lu\n", i, (uint32)vecs[i].iov_base, vecs[i].iov_len); @@ -309,7 +309,7 @@ static status_t vfs_write_pages(void *device, void *cookie, off_t offset, const iovec *vecs, size_t count, size_t *bytes, bool kernel) { - printf("write offset %Ld, length %lu\n", offset, *bytes); + printf("write offset %lld, length %lu\n", offset, *bytes); for (uint32 i = 0; i < count; i++) { printf(" [%lu] base %lu, length %lu\n", i, (uint32)vecs[i].iov_base, vecs[i].iov_len); @@ -445,7 +445,7 @@ static status_t pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count, size_t *_numBytes, bool doWrite) { - TRACE(("pages_io: ref = %p, offset = %Ld, size = %lu, vecCount = %lu, %s\n", ref, offset, + TRACE(("pages_io: ref = %p, offset = %lld, size = %lu, vecCount = %lu, %s\n", ref, offset, *_numBytes, count, doWrite ? "write" : "read")); // translate the iovecs into direct device accesses @@ -456,7 +456,7 @@ pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count, status_t status = get_file_map(ref, offset, numBytes, fileVecs, &fileVecCount); if (status < B_OK && status != B_BUFFER_OVERFLOW) { - TRACE(("get_file_map(offset = %Ld, numBytes = %lu) failed: %s\n", offset, + TRACE(("get_file_map(offset = %lld, numBytes = %lu) failed: %s\n", offset, numBytes, strerror(status))); return status; } @@ -464,10 +464,10 @@ pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count, bool bufferOverflow = status == B_BUFFER_OVERFLOW; #ifdef TRACE_FILE_CACHE - dprintf("got %lu file vecs for %Ld:%lu%s:\n", fileVecCount, offset, numBytes, + dprintf("got %lu file vecs for %lld:%lu%s:\n", fileVecCount, offset, numBytes, bufferOverflow ? " (array too small)" : ""); for (size_t i = 0; i < fileVecCount; i++) { - dprintf(" [%lu] offset = %Ld, size = %Ld\n", + dprintf(" [%lu] offset = %lld, size = %lld\n", i, fileVecs[i].offset, fileVecs[i].length); } #endif @@ -475,7 +475,7 @@ pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count, if (fileVecCount == 0) { // There are no file vecs at this offset, so we're obviously trying // to access the file outside of its bounds - TRACE(("pages_io: access outside of vnode %p at offset %Ld\n", + TRACE(("pages_io: access outside of vnode %p at offset %lld\n", ref->vnode, offset)); return B_BAD_VALUE; } @@ -546,7 +546,7 @@ pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count, off_t fileOffset = fileVec.offset; off_t fileLeft = min_c(fileVec.length, bytesLeft); - TRACE(("FILE VEC [%lu] length %Ld\n", fileVecIndex, fileLeft)); + TRACE(("FILE VEC [%lu] length %lld\n", fileVecIndex, fileLeft)); // process the complete fileVec while (fileLeft > 0) { @@ -615,7 +615,7 @@ pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count, status = get_file_map(ref, offset + totalSize, bytesLeft, fileVecs, &fileVecCount); if (status < B_OK && status != B_BUFFER_OVERFLOW) { - TRACE(("get_file_map(offset = %Ld, numBytes = %lu) failed: %s\n", + TRACE(("get_file_map(offset = %lld, numBytes = %lu) failed: %s\n", offset, numBytes, strerror(status))); return status; } @@ -624,11 +624,11 @@ pages_io(file_cache_ref *ref, off_t offset, const iovec *vecs, size_t count, fileVecIndex = 0; #ifdef TRACE_FILE_CACHE - dprintf("got %lu file vecs for %Ld:%lu%s:\n", fileVecCount, + dprintf("got %lu file vecs for %lld:%lu%s:\n", fileVecCount, offset + totalSize, numBytes, bufferOverflow ? " (array too small)" : ""); for (size_t i = 0; i < fileVecCount; i++) { - dprintf(" [%lu] offset = %Ld, size = %Ld\n", + dprintf(" [%lu] offset = %lld, size = %lld\n", i, fileVecs[i].offset, fileVecs[i].length); } #endif diff --git a/src/tests/system/kernel/device_manager/dma_resource_test.cpp b/src/tests/system/kernel/device_manager/dma_resource_test.cpp index bc3a962b5f..ae70591ef4 100644 --- a/src/tests/system/kernel/device_manager/dma_resource_test.cpp +++ b/src/tests/system/kernel/device_manager/dma_resource_test.cpp @@ -486,7 +486,7 @@ Test::_CheckWrite() continue; if (disk[i] != i % 26 + 'a') { - dprintf("disk[i] %c, expected %c, i %lu, fLength + fOffset %Ld\n", + dprintf("disk[i] %c, expected %c, i %lu, fLength + fOffset %lld\n", disk[i], (int)(i % 26 + 'a'), i, fLength + fOffset); dprintf("offset %lu differs, touched innocent data:\n", i); i &= ~63; diff --git a/src/tests/system/kernel/scheduler/main.cpp b/src/tests/system/kernel/scheduler/main.cpp index f29c03c002..c672c3a313 100644 --- a/src/tests/system/kernel/scheduler/main.cpp +++ b/src/tests/system/kernel/scheduler/main.cpp @@ -192,7 +192,7 @@ CPU::_Run() thread_info info; get_thread_info(find_thread(NULL), &info); - printf("CPU %d has halted, user %Ld, %ld rescheduled.\n", + printf("CPU %d has halted, user %lld, %ld rescheduled.\n", fCPU.cpu_num, info.user_time, fRescheduleCount); delete this; } diff --git a/src/tests/system/libroot/posix/dirent_test.cpp b/src/tests/system/libroot/posix/dirent_test.cpp index da5a4709c4..045683d55c 100644 --- a/src/tests/system/libroot/posix/dirent_test.cpp +++ b/src/tests/system/libroot/posix/dirent_test.cpp @@ -21,7 +21,7 @@ main(int argc, char** argv) if (dirent == NULL) break; - printf("Entry: dev %ld, ino %Ld, name \"%s\"\n", dirent->d_dev, + printf("Entry: dev %ld, ino %lld, name \"%s\"\n", dirent->d_dev, dirent->d_ino, dirent->d_name); //printf(" left: %u, next: %d\n", dir->entries_left, dir->next_entry); } @@ -33,7 +33,7 @@ main(int argc, char** argv) if (dirent == NULL) break; - printf("Entry: dev %ld, ino %Ld, name \"%s\"\n", dirent->d_dev, + printf("Entry: dev %ld, ino %lld, name \"%s\"\n", dirent->d_dev, dirent->d_ino, dirent->d_name); //printf(" left: %u, next: %d\n", dir->entries_left, dir->next_entry); } @@ -51,7 +51,7 @@ main(int argc, char** argv) if (readdir_r(dir, buf, &dirent) != 0 || dirent == NULL) break; - printf("Entry: dev %ld, ino %Ld, name \"%s\"\n", dirent->d_dev, + printf("Entry: dev %ld, ino %lld, name \"%s\"\n", dirent->d_dev, dirent->d_ino, dirent->d_name); //printf(" left: %u, next: %d\n", dir->entries_left, dir->next_entry); } @@ -62,7 +62,7 @@ main(int argc, char** argv) if (readdir_r(dir, buf, &dirent) != 0 || dirent == NULL) break; - printf("Entry: dev %ld, ino %Ld, name \"%s\"\n", dirent->d_dev, + printf("Entry: dev %ld, ino %lld, name \"%s\"\n", dirent->d_dev, dirent->d_ino, dirent->d_name); //printf(" left: %u, next: %d\n", dir->entries_left, dir->next_entry); } diff --git a/src/tools/fs_shell/block_cache.cpp b/src/tools/fs_shell/block_cache.cpp index dea256172b..891b8386e5 100644 --- a/src/tools/fs_shell/block_cache.cpp +++ b/src/tools/fs_shell/block_cache.cpp @@ -603,7 +603,7 @@ block_cache::RemoveUnusedBlocks(int32_t maxAccessed, int32_t count) if (maxAccessed < block->accessed) continue; - TRACE((" remove block %Ld, accessed %ld times\n", + TRACE((" remove block %lld, accessed %ld times\n", block->block_number, block->accessed)); // this can only happen if no transactions are used @@ -752,7 +752,7 @@ get_cached_block(block_cache* cache, fssh_off_t blockNumber, bool* _allocated, } if (block->unused) { - //TRACE(("remove block %Ld from unused\n", blockNumber)); + //TRACE(("remove block %lld from unused\n", blockNumber)); block->unused = false; cache->unused_blocks.Remove(block); } @@ -776,7 +776,7 @@ static fssh_status_t get_writable_cached_block(block_cache* cache, fssh_off_t blockNumber, fssh_off_t base, fssh_off_t length, int32_t transactionID, bool cleared, void** _block) { - TRACE(("get_writable_cached_block(blockNumber = %Ld, transaction = %d)\n", + TRACE(("get_writable_cached_block(blockNumber = %lld, transaction = %d)\n", blockNumber, transactionID)); if (blockNumber < 0 || blockNumber >= cache->max_blocks) { @@ -896,7 +896,7 @@ write_cached_block(block_cache* cache, cached_block* block, ? block->original_data : block->current_data; // we first need to write back changes from previous transactions - TRACE(("write_cached_block(block %Ld)\n", block->block_number)); + TRACE(("write_cached_block(block %lld)\n", block->block_number)); fssh_ssize_t written = fssh_write_pos(cache->fd, block->block_number * blockSize, data, blockSize); @@ -1125,7 +1125,7 @@ fssh_cache_abort_transaction(void* _cache, int32_t id) next = block->transaction_next; if (block->original_data != NULL) { - TRACE(("cache_abort_transaction(id = %ld): restored contents of block %Ld\n", + TRACE(("cache_abort_transaction(id = %ld): restored contents of block %lld\n", transaction->id, block->block_number)); fssh_memcpy(block->current_data, block->original_data, cache->block_size); cache->Free(block->original_data); @@ -1280,7 +1280,7 @@ fssh_cache_abort_sub_transaction(void* _cache, int32_t id) } } else if (block->parent_data != block->current_data) { // the block has been changed and must be restored - TRACE(("cache_abort_sub_transaction(id = %ld): restored contents of block %Ld\n", + TRACE(("cache_abort_sub_transaction(id = %ld): restored contents of block %lld\n", transaction->id, block->block_number)); fssh_memcpy(block->current_data, block->parent_data, cache->block_size); @@ -1658,7 +1658,7 @@ fssh_block_cache_get_writable_etc(void* _cache, fssh_off_t blockNumber, block_cache* cache = (block_cache*)_cache; MutexLocker locker(&cache->lock); - TRACE(("block_cache_get_writable_etc(block = %Ld, transaction = %ld)\n", + TRACE(("block_cache_get_writable_etc(block = %lld, transaction = %ld)\n", blockNumber, transaction)); if (cache->read_only) fssh_panic("tried to get writable block on a read-only cache!"); @@ -1689,7 +1689,7 @@ fssh_block_cache_get_empty(void* _cache, fssh_off_t blockNumber, block_cache* cache = (block_cache*)_cache; MutexLocker locker(&cache->lock); - TRACE(("block_cache_get_empty(block = %Ld, transaction = %ld)\n", + TRACE(("block_cache_get_empty(block = %lld, transaction = %ld)\n", blockNumber, transaction)); if (cache->read_only) fssh_panic("tried to get empty writable block on a read-only cache!"); diff --git a/src/tools/fs_shell/fd.cpp b/src/tools/fs_shell/fd.cpp index 305a867b3a..e0cb67b7b8 100644 --- a/src/tools/fs_shell/fd.cpp +++ b/src/tools/fs_shell/fd.cpp @@ -41,7 +41,7 @@ void dump_fd(int fd, struct file_descriptor *descriptor); void dump_fd(int fd,struct file_descriptor *descriptor) { - fssh_dprintf("fd[%d] = %p: type = %d, ref_count = %d, ops = %p, u.vnode = %p, u.mount = %p, cookie = %p, open_mode = %x, pos = %Ld\n", + fssh_dprintf("fd[%d] = %p: type = %d, ref_count = %d, ops = %p, u.vnode = %p, u.mount = %p, cookie = %p, open_mode = %x, pos = %lld\n", fd, descriptor, (int)descriptor->type, (int)descriptor->ref_count, descriptor->ops, descriptor->u.vnode, descriptor->u.mount, descriptor->cookie, (int)descriptor->open_mode, descriptor->pos); } diff --git a/src/tools/fs_shell/file_cache.cpp b/src/tools/fs_shell/file_cache.cpp index 0854d832d9..c0c84b0d24 100644 --- a/src/tools/fs_shell/file_cache.cpp +++ b/src/tools/fs_shell/file_cache.cpp @@ -151,7 +151,7 @@ cache_io(void *_cacheRef, void *cookie, fssh_off_t offset, fssh_addr_t buffer, file_cache_ref *ref = (file_cache_ref *)_cacheRef; fssh_off_t fileSize = ref->virtual_size; - TRACE(("cache_io(ref = %p, offset = %Ld, buffer = %p, size = %u, %s)\n", + TRACE(("cache_io(ref = %p, offset = %lld, buffer = %p, size = %u, %s)\n", ref, offset, (void *)buffer, *_size, doWrite ? "write" : "read")); // out of bounds access? @@ -235,7 +235,7 @@ void * fssh_file_cache_create(fssh_mount_id mountID, fssh_vnode_id vnodeID, fssh_off_t size) { - TRACE(("file_cache_create(mountID = %d, vnodeID = %Ld, size = %Ld)\n", + TRACE(("file_cache_create(mountID = %d, vnodeID = %lld, size = %lld)\n", mountID, vnodeID, size)); file_cache_ref *ref = new(nothrow) file_cache_ref; @@ -309,7 +309,7 @@ fssh_file_cache_set_size(void *_cacheRef, fssh_off_t size) { file_cache_ref *ref = (file_cache_ref *)_cacheRef; - TRACE(("file_cache_set_size(ref = %p, size = %Ld)\n", ref, size)); + TRACE(("file_cache_set_size(ref = %p, size = %lld)\n", ref, size)); if (ref == NULL) return FSSH_B_OK; @@ -339,7 +339,7 @@ fssh_file_cache_read(void *_cacheRef, void *cookie, fssh_off_t offset, { file_cache_ref *ref = (file_cache_ref *)_cacheRef; - TRACE(("file_cache_read(ref = %p, offset = %Ld, buffer = %p, size = %u)\n", + TRACE(("file_cache_read(ref = %p, offset = %lld, buffer = %p, size = %u)\n", ref, offset, bufferBase, *_size)); return cache_io(ref, cookie, offset, (fssh_addr_t)bufferBase, _size, false); @@ -354,7 +354,7 @@ fssh_file_cache_write(void *_cacheRef, void *cookie, fssh_off_t offset, fssh_status_t status = cache_io(ref, cookie, offset, (fssh_addr_t)const_cast(buffer), _size, true); - TRACE(("file_cache_write(ref = %p, offset = %Ld, buffer = %p, size = %u) = %d\n", + TRACE(("file_cache_write(ref = %p, offset = %lld, buffer = %p, size = %u) = %d\n", ref, offset, buffer, *_size, status)); return status; diff --git a/src/tools/fs_shell/vfs.cpp b/src/tools/fs_shell/vfs.cpp index 0d309db75a..e31ad5e40f 100644 --- a/src/tools/fs_shell/vfs.cpp +++ b/src/tools/fs_shell/vfs.cpp @@ -1801,7 +1801,7 @@ common_file_io_vec_pages(int fd, const fssh_file_io_vec *fileVecs, fssh_off_t fileOffset = fileVec.offset; fssh_off_t fileLeft = fssh_min_c((uint64_t)fileVec.length, (uint64_t)bytesLeft); - TRACE(("FILE VEC [%lu] length %Ld\n", fileVecIndex, fileLeft)); + TRACE(("FILE VEC [%lu] length %lld\n", fileVecIndex, fileLeft)); // process the complete fileVec while (fileLeft > 0) { @@ -1879,7 +1879,7 @@ extern "C" fssh_status_t fssh_new_vnode(fssh_fs_volume *volume, fssh_vnode_id vnodeID, void *privateNode, fssh_fs_vnode_ops *ops) { - FUNCTION(("new_vnode(volume = %p (%ld), vnodeID = %Ld, node = %p)\n", + FUNCTION(("new_vnode(volume = %p (%ld), vnodeID = %lld, node = %p)\n", volume, volume->id, vnodeID, privateNode)); if (privateNode == NULL) @@ -3118,7 +3118,7 @@ file_open_entry_ref(fssh_mount_id mountID, fssh_vnode_id directoryID, const char if (name == NULL || *name == '\0') return FSSH_B_BAD_VALUE; - FUNCTION(("file_open_entry_ref(ref = (%ld, %Ld, %s), openMode = %d)\n", + FUNCTION(("file_open_entry_ref(ref = (%ld, %lld, %s), openMode = %d)\n", mountID, directoryID, name, openMode)); // get the vnode matching the entry_ref @@ -3192,7 +3192,7 @@ file_read(struct file_descriptor *descriptor, fssh_off_t pos, void *buffer, fssh { struct vnode *vnode = descriptor->u.vnode; - FUNCTION(("file_read: buf %p, pos %Ld, len %p = %ld\n", buffer, pos, length, *length)); + FUNCTION(("file_read: buf %p, pos %lld, len %p = %ld\n", buffer, pos, length, *length)); return FS_CALL(vnode, read, descriptor->cookie, pos, buffer, length); } @@ -3202,7 +3202,7 @@ file_write(struct file_descriptor *descriptor, fssh_off_t pos, const void *buffe { struct vnode *vnode = descriptor->u.vnode; - FUNCTION(("file_write: buf %p, pos %Ld, len %p\n", buffer, pos, length)); + FUNCTION(("file_write: buf %p, pos %lld, len %p\n", buffer, pos, length)); return FS_CALL(vnode, write, descriptor->cookie, pos, buffer, length); } @@ -3212,7 +3212,7 @@ file_seek(struct file_descriptor *descriptor, fssh_off_t pos, int seekType) { fssh_off_t offset; - FUNCTION(("file_seek(pos = %Ld, seekType = %d)\n", pos, seekType)); + FUNCTION(("file_seek(pos = %lld, seekType = %d)\n", pos, seekType)); // ToDo: seek should fail for pipes and FIFOs... switch (seekType) { @@ -3263,7 +3263,7 @@ dir_create_entry_ref(fssh_mount_id mountID, fssh_vnode_id parentID, const char * if (name == NULL || *name == '\0') return FSSH_B_BAD_VALUE; - FUNCTION(("dir_create_entry_ref(dev = %ld, ino = %Ld, name = '%s', perms = %d)\n", mountID, parentID, name, perms)); + FUNCTION(("dir_create_entry_ref(dev = %ld, ino = %lld, name = '%s', perms = %d)\n", mountID, parentID, name, perms)); status = get_vnode(mountID, parentID, &vnode, kernel); if (status < FSSH_B_OK) @@ -4127,7 +4127,7 @@ attr_read(struct file_descriptor *descriptor, fssh_off_t pos, void *buffer, fssh { struct vnode *vnode = descriptor->u.vnode; - FUNCTION(("attr_read: buf %p, pos %Ld, len %p = %ld\n", buffer, pos, length, *length)); + FUNCTION(("attr_read: buf %p, pos %lld, len %p = %ld\n", buffer, pos, length, *length)); if (!HAS_FS_CALL(vnode, read_attr)) return FSSH_EOPNOTSUPP; @@ -4140,7 +4140,7 @@ attr_write(struct file_descriptor *descriptor, fssh_off_t pos, const void *buffe { struct vnode *vnode = descriptor->u.vnode; - FUNCTION(("attr_write: buf %p, pos %Ld, len %p\n", buffer, pos, length)); + FUNCTION(("attr_write: buf %p, pos %lld, len %p\n", buffer, pos, length)); if (!HAS_FS_CALL(vnode, write_attr)) return FSSH_EOPNOTSUPP; diff --git a/src/tools/restest/ResourceFile.cpp b/src/tools/restest/ResourceFile.cpp index ffb69d9475..e5b5e88b43 100644 --- a/src/tools/restest/ResourceFile.cpp +++ b/src/tools/restest/ResourceFile.cpp @@ -495,7 +495,7 @@ ResourceFile::WriteTest() uint32 size = GetResourcesSize(); if (size != fFileSize) { throw Exception("Calculated resources size differs from actual size " - "in file: %lu vs %Ld.", size, fFileSize); + "in file: %lu vs %lld.", size, fFileSize); } char* buffer1 = new char[size]; char* buffer2 = new char[size]; @@ -508,7 +508,7 @@ ResourceFile::WriteTest() off_t filePosition = fFile.GetOffset() + i; throw Exception("Written resources differ from those in file. " "First difference at byte %lu (file position " - "%Ld): %x vs %x.", i, filePosition, + "%lld): %x vs %x.", i, filePosition, (int)buffer1[i] & 0xff, (int)buffer2[i] & 0xff); } @@ -534,7 +534,7 @@ ResourceFile::PrintToStream(bool longInfo) printf("file type : %s\n", kFileTypeNames[fFileType]); printf("endianess : %s\n", (fHostEndianess == (bool)B_HOST_IS_LENDIAN) ? "little" : "big"); - printf("resource section offset: 0x%08Lx (%Ld)\n", resourcesOffset, + printf("resource section offset: 0x%08Lx (%lld)\n", resourcesOffset, resourcesOffset); if (fInfoTableItem) { int32 offset = fInfoTableItem->GetOffset();