Changeset ebb1489 in mainline for uspace/lib/console


Ignore:
Timestamp:
2024-10-13T08:23:40Z (14 months ago)
Author:
GitHub <noreply@…>
Parents:
2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
git-committer:
GitHub <noreply@…> (2024-10-13 08:23:40)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

Location:
uspace/lib/console
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/console/include/io/cons_event.h

    r2a0c827c rebb1489  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3636#define _LIBCONSOLE_IO_CONS_EVENT_H_
    3737
    38 #include <adt/list.h>
    3938#include <io/kbd_event.h>
    4039#include <io/pos_event.h>
     
    4443        CEV_KEY,
    4544        /** Position event */
    46         CEV_POS
     45        CEV_POS,
     46        /** Resize event */
     47        CEV_RESIZE,
    4748} cons_event_type_t;
    4849
    4950/** Console event structure. */
    5051typedef struct {
    51         /** List handle */
    52         link_t link;
    53 
    5452        /** Event type */
    5553        cons_event_type_t type;
  • uspace/lib/console/src/con_srv.c

    r2a0c827c rebb1489  
    5353                ipc_set_arg4(icall, event->ev.key.mods);
    5454                ipc_set_arg5(icall, event->ev.key.c);
    55                 break;
     55                return EOK;
    5656        case CEV_POS:
    5757                ipc_set_arg2(icall, (event->ev.pos.pos_id << 16) | (event->ev.pos.type & 0xffff));
     
    5959                ipc_set_arg4(icall, event->ev.pos.hpos);
    6060                ipc_set_arg5(icall, event->ev.pos.vpos);
    61                 break;
    62         default:
    63                 return EIO;
    64         }
    65 
    66         return EOK;
     61                return EOK;
     62        case CEV_RESIZE:
     63                ipc_set_arg2(icall, 0);
     64                ipc_set_arg3(icall, 0);
     65                ipc_set_arg4(icall, 0);
     66                ipc_set_arg5(icall, 0);
     67                return EOK;
     68        }
     69
     70        return EIO;
    6771}
    6872
     
    462466                }
    463467
    464                 if (!received)
     468                if (!received || srv->srvs->aborted)
    465469                        break;
    466470
  • uspace/lib/console/src/console.c

    r2a0c827c rebb1489  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * Copyright (c) 2006 Josef Cejka
    44 * Copyright (c) 2006 Jakub Vana
     
    3636
    3737#include <as.h>
     38#include <dbgcon.h>
    3839#include <libc.h>
    3940#include <async.h>
     
    7778bool console_kcon(void)
    7879{
    79         return __SYSCALL0(SYS_DEBUG_CONSOLE);
     80        return dbgcon_enable();
    8081}
    8182
     
    192193                event->ev.key.mods = ipc_get_arg4(call);
    193194                event->ev.key.c = ipc_get_arg5(call);
    194                 break;
     195                return EOK;
    195196        case CEV_POS:
    196197                event->ev.pos.pos_id = ipc_get_arg2(call) >> 16;
     
    199200                event->ev.pos.hpos = ipc_get_arg4(call);
    200201                event->ev.pos.vpos = ipc_get_arg5(call);
    201                 break;
    202         default:
    203                 return EIO;
    204         }
    205 
    206         return EOK;
     202                return EOK;
     203        case CEV_RESIZE:
     204                return EOK;
     205        }
     206
     207        return EIO;
    207208}
    208209
Note: See TracChangeset for help on using the changeset viewer.