diff options
Diffstat (limited to 'src/drv/tty')
| -rw-r--r-- | src/drv/tty/private_include/drv/tty/ops.h | 4 | ||||
| -rw-r--r-- | src/drv/tty/src/update.backup.c | 2 | ||||
| -rw-r--r-- | src/drv/tty/src/update.c | 2 | ||||
| -rw-r--r-- | src/drv/tty/src/write.c | 6 |
4 files changed, 6 insertions, 8 deletions
diff --git a/src/drv/tty/private_include/drv/tty/ops.h b/src/drv/tty/private_include/drv/tty/ops.h index b50b00a..ceab56a 100644 --- a/src/drv/tty/private_include/drv/tty/ops.h +++ b/src/drv/tty/private_include/drv/tty/ops.h @@ -23,8 +23,8 @@ #include <drv/tty/types.h> #include <stddef.h> -int drv_tty_write(const void *buf, size_t n, const struct drv_event_done *done, - void *args); +int drv_tty_write(struct drv_port *p, const void *buf, size_t n, + const struct drv_event_done *done); int drv_tty_setdim(struct drv_port *p, unsigned x, unsigned y); #endif diff --git a/src/drv/tty/src/update.backup.c b/src/drv/tty/src/update.backup.c index d072977..07e2a09 100644 --- a/src/drv/tty/src/update.backup.c +++ b/src/drv/tty/src/update.backup.c @@ -34,7 +34,7 @@ static int init(struct drv_port *const p) const struct drv_event_ops ops = { .write = drv_tty_write, - .args = p + .p = p }; if (ev->status("tty", &ops, true, 0666, ev->args)) diff --git a/src/drv/tty/src/update.c b/src/drv/tty/src/update.c index 7c01678..b5644d0 100644 --- a/src/drv/tty/src/update.c +++ b/src/drv/tty/src/update.c @@ -34,7 +34,7 @@ static int init(struct drv_port *const p) const struct drv_event_ops ops = { .write = drv_tty_write, - .args = p + .p = p }; if (ev->status("tty", &ops, true, 0666, ev->args)) diff --git a/src/drv/tty/src/write.c b/src/drv/tty/src/write.c index d4a988d..c7b90ed 100644 --- a/src/drv/tty/src/write.c +++ b/src/drv/tty/src/write.c @@ -23,11 +23,9 @@ #include <errno.h> #include <stddef.h> -int drv_tty_write(const void *const buf, const size_t n, - const struct drv_event_done *const d, void *const args) +int drv_tty_write(struct drv_port *const p, const void *const buf, + const size_t n, const struct drv_event_done *const d) { - struct drv_port *const p = args; - for (const char *s = buf; s - (const char *)buf < n; s++) { struct row *const r = p->last_row; |
