mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix format strings
This commit is contained in:
parent
8a99307ba2
commit
c90b1c1f3e
4 changed files with 17 additions and 16 deletions
|
@ -23,7 +23,7 @@
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <villas/config.h>
|
||||
#include <villas/config.hpp>
|
||||
#include <villas/plugin.hpp>
|
||||
|
||||
#include <villas/kernel/kernel.hpp>
|
||||
|
@ -58,7 +58,7 @@ InterruptController::init()
|
|||
for (int i = 0; i < num_irqs; i++) {
|
||||
|
||||
/* Try pinning to core */
|
||||
int ret = kernel::irq_setaffinity(nos[i], card->affinity, nullptr);
|
||||
int ret = kernel::setIRQAffinity(nos[i], card->affinity, nullptr);
|
||||
|
||||
switch(ret) {
|
||||
case 0:
|
||||
|
|
|
@ -48,9 +48,9 @@ void Gpu2Rtds::dump(spdlog::level::level_enum logLevel)
|
|||
logger->log(logLevel, " Frame too short: {}", (status.frame_too_short ? "yes" : "no"));
|
||||
logger->log(logLevel, " Frame too long: {}", (status.frame_too_long ? "yes" : "no"));
|
||||
logger->log(logLevel, " Frame size invalid: {}", (status.invalid_frame_size ? "yes" : "no"));
|
||||
logger->log(logLevel, " Last count: {}", status.last_count);
|
||||
logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr);
|
||||
logger->log(logLevel, " Max. frame size: {}", status.max_frame_size);
|
||||
logger->log(logLevel, " Last count: {}", (int) status.last_count);
|
||||
logger->log(logLevel, " Last seq. number: {}", (int) status.last_seq_nr);
|
||||
logger->log(logLevel, " Max. frame size: {}", (int) status.max_frame_size);
|
||||
}
|
||||
|
||||
//bool Gpu2Rtds::startOnce(const MemoryBlock &mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset)
|
||||
|
@ -126,6 +126,6 @@ Gpu2Rtds::getMaxFrameSize()
|
|||
// logger->info("Doorbell register: {:#08x}", doorbell.value);
|
||||
// logger->info(" Valid: {}", (doorbell.is_valid ? "yes" : "no"));
|
||||
// logger->info(" Count: {}", doorbell.count);
|
||||
// logger->info(" Seq. number: {}", doorbell.seq_nr);
|
||||
// logger->info(" Seq. number: {}", (int) doorbell.seq_nr);
|
||||
//}
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ void Rtds2Gpu::dump(spdlog::level::level_enum logLevel)
|
|||
logger->log(logLevel, " Frame too short: {}", (status.frame_too_short ? "yes" : "no"));
|
||||
logger->log(logLevel, " Frame too long: {}", (status.frame_too_long ? "yes" : "no"));
|
||||
logger->log(logLevel, " Frame size invalid: {}", (status.invalid_frame_size ? "yes" : "no"));
|
||||
logger->log(logLevel, " Last count: {}", status.last_count);
|
||||
logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr);
|
||||
logger->log(logLevel, " Max. frame size: {}", status.max_frame_size);
|
||||
logger->log(logLevel, " Last count: {}", (int) status.last_count);
|
||||
logger->log(logLevel, " Last seq. number: {}", (int) status.last_seq_nr);
|
||||
logger->log(logLevel, " Max. frame size: {}", (int) status.max_frame_size);
|
||||
}
|
||||
|
||||
bool Rtds2Gpu::startOnce(const MemoryBlock &mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset)
|
||||
|
@ -106,8 +106,8 @@ Rtds2Gpu::dumpDoorbell(uint32_t doorbellRegister) const
|
|||
auto &doorbell = reinterpret_cast<reg_doorbell_t&>(doorbellRegister);
|
||||
|
||||
logger->info("Doorbell register: {:#08x}", doorbell.value);
|
||||
logger->info(" Valid: {}", (doorbell.is_valid ? "yes" : "no"));
|
||||
logger->info(" Count: {}", doorbell.count);
|
||||
logger->info(" Seq. number: {}", doorbell.seq_nr);
|
||||
logger->info(" Valid: {}", doorbell.is_valid ? "yes" : "no");
|
||||
logger->info(" Count: {}", (int) doorbell.count);
|
||||
logger->info(" Seq. number: {}", (int) doorbell.seq_nr);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
@ -73,14 +74,14 @@ int main(int argc, char **argv) {
|
|||
PRINT_ERROR;
|
||||
|
||||
printf("%s opened.\n", filename);
|
||||
printf("Target offset is %#lx, page size is %lu\n", target, sysconf(_SC_PAGE_SIZE));
|
||||
printf("Target offset is %#jx, page size is %lu\n", (intmax_t) target, sysconf(_SC_PAGE_SIZE));
|
||||
|
||||
fflush(stdout);
|
||||
|
||||
/* Map one page */
|
||||
printf("mmap(%d, %lu, %#x, %#x, %d, %#lx)\n", 0,
|
||||
printf("mmap(%d, %lu, %#x, %#x, %d, %#jx)\n", 0,
|
||||
MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
|
||||
fd, target);
|
||||
fd, (intmax_t) target);
|
||||
|
||||
map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, target & ~MAP_MASK);
|
||||
|
||||
|
@ -107,7 +108,7 @@ int main(int argc, char **argv) {
|
|||
exit(2);
|
||||
}
|
||||
|
||||
printf("Value at offset %#lx (%p): %#x\n", target, virt_addr, read_result);
|
||||
printf("Value at offset %#jx (%p): %#x\n", (intmax_t) target, virt_addr, read_result);
|
||||
fflush(stdout);
|
||||
|
||||
if (argc > 4) {
|
||||
|
|
Loading…
Add table
Reference in a new issue