From cb6509861feec2f9022bdff5ad26ba21fd19b688 Mon Sep 17 00:00:00 2001 From: Frank Rolsted Jensen Date: Fri, 13 Oct 2023 09:23:18 +0200 Subject: [PATCH] Client index included in debug output --- src/ttynvt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ttynvt.c b/src/ttynvt.c index 38b7781..a42f0cb 100644 --- a/src/ttynvt.c +++ b/src/ttynvt.c @@ -563,7 +563,7 @@ ttynvt_read(fuse_req_t req, size_t size, off_t off, pthread_mutex_lock(&tty->read_lock); - DBG2("%s\n", __func__); + DBG2("%s (%d)\n", __func__, tty_cli->id); if (tty->error) { @@ -607,7 +607,7 @@ ttynvt_read(fuse_req_t req, size_t size, off_t off, goto out; } - DBG2("%s: cli=%d fd=%d: sz=%u/%u: '%.*s'\n", __func__, + DBG2("%s (%d): fd=%d: sz=%u/%u: '%.*s'\n", __func__, tty_cli->id, tty->fds[FD_SLAVE].fd, res, (int)size, res, buf); fuse_reply_buf(req, buf, res); @@ -626,7 +626,7 @@ ttynvt_write(fuse_req_t req, const char *data, size_t size, off_t off, pthread_mutex_lock(&tty->write_lock); - DBG2("%s: cli=%d fd=%d: sz=%u: '%.*s'\n", __func__, + DBG2("%s (%d): fd=%d: sz=%u: '%.*s'\n", __func__, tty_cli->id, tty->fds[FD_SLAVE].fd, (int)size, (int)size, data); if (size == 0) @@ -850,7 +850,7 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg, pthread_mutex_lock(&tty->ioctl_lock); - DBG("%s: cli=%d cmd=%s arg=%p ibuf=%p:%u obuf=:%u\n", __func__, + DBG("%s (%d): cmd=%s arg=%p ibuf=%p:%u obuf=:%u\n", __func__, tty_cli->id, _ioctl_name(cmd), arg, in_buf, (unsigned int)in_bufsz, (unsigned int)out_bufsz); @@ -1133,7 +1133,7 @@ ttynvt_poll(fuse_req_t req, struct fuse_file_info *info, ttynvt_t *tty = tty_cli->tty; int revents = 0; - DBG2("%s: cli=%d, tty->pollin=%d tty->error/epipe=%d/%d\n", + DBG2("%s (%d): tty->pollin=%d tty->error/epipe=%d/%d\n", __func__, tty_cli->id, tty->pollin, tty->error, tty->epipe); _update_notify(tty, ph);