mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #8364 from smlng/osx/debug/fix_output
macOS: fix debug output
This commit is contained in:
commit
3bb169307b
@ -92,7 +92,7 @@ int __attribute__((used)) sched_run(void)
|
||||
thread_t *next_thread = container_of(sched_runqueues[nextrq].next->next, thread_t, rq_entry);
|
||||
|
||||
DEBUG("sched_run: active thread: %" PRIkernel_pid ", next thread: %" PRIkernel_pid "\n",
|
||||
(active_thread == NULL) ? KERNEL_PID_UNDEF : active_thread->pid,
|
||||
(kernel_pid_t)((active_thread == NULL) ? KERNEL_PID_UNDEF : active_thread->pid),
|
||||
next_thread->pid);
|
||||
|
||||
if (active_thread == next_thread) {
|
||||
@ -162,7 +162,7 @@ void sched_set_status(thread_t *process, unsigned int status)
|
||||
{
|
||||
if (status >= STATUS_ON_RUNQUEUE) {
|
||||
if (!(process->status >= STATUS_ON_RUNQUEUE)) {
|
||||
DEBUG("sched_set_status: adding thread %" PRIkernel_pid " to runqueue %" PRIu16 ".\n",
|
||||
DEBUG("sched_set_status: adding thread %" PRIkernel_pid " to runqueue %" PRIu8 ".\n",
|
||||
process->pid, process->priority);
|
||||
clist_rpush(&sched_runqueues[process->priority], &(process->rq_entry));
|
||||
runqueue_bitcache |= 1 << process->priority;
|
||||
@ -170,7 +170,7 @@ void sched_set_status(thread_t *process, unsigned int status)
|
||||
}
|
||||
else {
|
||||
if (process->status >= STATUS_ON_RUNQUEUE) {
|
||||
DEBUG("sched_set_status: removing thread %" PRIkernel_pid " to runqueue %" PRIu16 ".\n",
|
||||
DEBUG("sched_set_status: removing thread %" PRIkernel_pid " to runqueue %" PRIu8 ".\n",
|
||||
process->pid, process->priority);
|
||||
clist_lpop(&sched_runqueues[process->priority]);
|
||||
|
||||
|
@ -879,7 +879,7 @@ static unsigned _match(const gnrc_netif_t *netif, const ipv6_addr_t *addr,
|
||||
ipv6_addr_to_str(addr_str, &netif->ipv6.addrs[*idx],
|
||||
sizeof(addr_str)),
|
||||
netif->pid);
|
||||
DEBUG("%s by %" PRIu8 " bits (used as source address = %s)\n",
|
||||
DEBUG("%s by %u bits (used as source address = %s)\n",
|
||||
ipv6_addr_to_str(addr_str, addr, sizeof(addr_str)),
|
||||
best_match,
|
||||
(filter != NULL) ? "true" : "false");
|
||||
|
@ -254,7 +254,7 @@ static void _send(gnrc_pktsnip_t *pkt)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
DEBUG("6lo: iface->sixlo.max_frag_size = %" PRIu16 " for interface %"
|
||||
DEBUG("6lo: iface->sixlo.max_frag_size = %" PRIu8 " for interface %"
|
||||
PRIkernel_pid "\n", iface->sixlo.max_frag_size, hdr->if_pid);
|
||||
|
||||
/* IP should not send anything here if it is not a 6LoWPAN interface,
|
||||
@ -278,7 +278,7 @@ static void _send(gnrc_pktsnip_t *pkt)
|
||||
return;
|
||||
}
|
||||
else if (datagram_size <= SIXLOWPAN_FRAG_MAX_LEN) {
|
||||
DEBUG("6lo: Send fragmented (%u > %" PRIu16 ")\n",
|
||||
DEBUG("6lo: Send fragmented (%u > %" PRIu8 ")\n",
|
||||
(unsigned int)datagram_size, iface->sixlo.max_frag_size);
|
||||
msg_t msg;
|
||||
|
||||
@ -301,7 +301,7 @@ static void _send(gnrc_pktsnip_t *pkt)
|
||||
}
|
||||
#else
|
||||
(void) datagram_size;
|
||||
DEBUG("6lo: packet too big (%u > %" PRIu16 ")\n",
|
||||
DEBUG("6lo: packet too big (%u > %" PRIu8 ")\n",
|
||||
(unsigned int)datagram_size, iface->sixlo.max_frag_size);
|
||||
gnrc_pktbuf_release(pkt2);
|
||||
#endif
|
||||
|
@ -46,7 +46,7 @@ int _ntpdate(int argc, char **argv)
|
||||
sock_udp_ep_t server = { .port = NTP_PORT, .family = AF_INET6 };
|
||||
ipv6_addr_t *addr = (ipv6_addr_t *)&server.addr;
|
||||
|
||||
int src_iface = ipv6_addr_split_iface(argv[1]);
|
||||
kernel_pid_t src_iface = ipv6_addr_split_iface(argv[1]);
|
||||
if (src_iface == -1) {
|
||||
src_iface = KERNEL_PID_UNDEF;
|
||||
}
|
||||
|
@ -413,7 +413,8 @@ int vfs_mount(vfs_mount_t *mountp)
|
||||
if ((mountp == NULL) || (mountp->fs == NULL) || (mountp->mount_point == NULL)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
DEBUG("vfs_mount: -> \"%s\" (%p), %p\n", mountp->mount_point, (void *)mountp->mount_point, mountp->private_data);
|
||||
DEBUG("vfs_mount: -> \"%s\" (%p), %p\n",
|
||||
mountp->mount_point, (void *)mountp->mount_point, mountp->private_data);
|
||||
if (mountp->mount_point[0] != '/') {
|
||||
DEBUG("vfs_mount: not absolute mount_point path\n");
|
||||
return -EINVAL;
|
||||
@ -727,7 +728,8 @@ int vfs_bind(int fd, int flags, const vfs_file_ops_t *f_op, void *private_data)
|
||||
|
||||
int vfs_normalize_path(char *buf, const char *path, size_t buflen)
|
||||
{
|
||||
DEBUG("vfs_normalize_path: %p, \"%s\" (%p), %lu\n", buf, path, path, (unsigned long)buflen);
|
||||
DEBUG("vfs_normalize_path: %p, \"%s\" (%p), %lu\n",
|
||||
(void *)buf, path, (void *)path, (unsigned long)buflen);
|
||||
size_t len = 0;
|
||||
int npathcomp = 0;
|
||||
const char *path_end = path + strlen(path); /* Find the terminating null byte */
|
||||
@ -736,7 +738,8 @@ int vfs_normalize_path(char *buf, const char *path, size_t buflen)
|
||||
}
|
||||
|
||||
while(path <= path_end) {
|
||||
DEBUG("vfs_normalize_path: + %d \"%.*s\" <- \"%s\" (%p)\n", npathcomp, (int)len, buf, path, path);
|
||||
DEBUG("vfs_normalize_path: + %d \"%.*s\" <- \"%s\" (%p)\n",
|
||||
npathcomp, (int)len, buf, path, (void *)path);
|
||||
if (path[0] == '\0') {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user