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