Changes in uspace/srv/hid/output/output.c [1382446:d3109ff] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/output/output.c
r1382446 rd3109ff 1 1 /* 2 * Copyright (c) 2024 Jiri Svoboda 2 3 * Copyright (c) 2011 Martin Decky 3 4 * All rights reserved. … … 39 40 #include <ipc/output.h> 40 41 #include <config.h> 42 #include <vt/vt100.h> 41 43 #include "port/ega.h" 42 44 #include "port/chardev.h" 43 45 #include "port/ddev.h" 44 46 #include "output.h" 45 46 #define MAX_COLS 12847 #define MAX_ROWS 12848 47 49 48 typedef struct { … … 115 114 static void srv_get_dimensions(ipc_call_t *icall) 116 115 { 117 sysarg_t cols = MAX_COLS; 118 sysarg_t rows = MAX_ROWS; 119 120 list_foreach(outdevs, link, outdev_t, dev) { 121 cols = min(cols, dev->cols); 122 rows = min(rows, dev->rows); 116 sysarg_t cols = 0; 117 sysarg_t rows = 0; 118 bool first; 119 120 first = true; 121 list_foreach(outdevs, link, outdev_t, dev) { 122 if (first) { 123 cols = dev->cols; 124 rows = dev->rows; 125 first = false; 126 } else { 127 cols = min(cols, dev->cols); 128 rows = min(rows, dev->rows); 129 } 123 130 } 124 131 … … 463 470 int main(int argc, char *argv[]) 464 471 { 472 loc_srv_t *srv; 473 465 474 if (argc < 2) { 466 475 usage(argv[0]); … … 472 481 /* Register server */ 473 482 async_set_fallback_port_handler(client_connection, NULL); 474 errno_t rc = loc_server_register(NAME );483 errno_t rc = loc_server_register(NAME, &srv); 475 484 if (rc != EOK) { 476 485 printf("%s: Unable to register driver\n", NAME); … … 479 488 480 489 service_id_t service_id; 481 rc = loc_service_register( argv[1], &service_id);490 rc = loc_service_register(srv, argv[1], &service_id); 482 491 if (rc != EOK) { 492 loc_server_unregister(srv); 493 483 494 printf("%s: Unable to register service %s\n", NAME, argv[1]); 484 495 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.