Changeset b48e680f in mainline for uspace/lib/c/generic/io/console.c
- Timestamp:
- 2021-11-03T10:23:28Z (17 months ago)
- Branches:
- master, serial
- Children:
- ec8a1bf
- Parents:
- ce862ac
- git-author:
- Jiri Svoboda <jiri@…> (2021-11-02 19:19:50)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-11-03 10:23:28)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/console.c
rce862ac rb48e680f 40 40 #include <errno.h> 41 41 #include <stdlib.h> 42 #include <str.h> 42 43 #include <vfs/vfs_sess.h> 43 44 #include <io/console.h> … … 128 129 async_req_1_0(exch, CONSOLE_SET_CURSOR_VISIBILITY, (show != false)); 129 130 async_exchange_end(exch); 131 } 132 133 /** Set console caption. 134 * 135 * Set caption text for the console (if the console suports captions). 136 * 137 * @param ctrl Console 138 * @param caption Caption text 139 * @return EOK on success or an error code 140 */ 141 errno_t console_set_caption(console_ctrl_t *ctrl, const char *caption) 142 { 143 async_exch_t *exch = async_exchange_begin(ctrl->output_sess); 144 ipc_call_t answer; 145 aid_t req = async_send_0(exch, CONSOLE_SET_CAPTION, &answer); 146 errno_t retval = async_data_write_start(exch, caption, str_size(caption)); 147 148 if (retval != EOK) { 149 async_forget(req); 150 async_exchange_end(exch); 151 return retval; 152 } 153 154 async_wait_for(req, &retval); 155 async_exchange_end(exch); 156 return EOK; 130 157 } 131 158
Note: See TracChangeset
for help on using the changeset viewer.