Changeset 3aae4e8 in mainline for uspace/app/bdsh/input.c


Ignore:
Timestamp:
2010-04-04T22:07:05Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
23de644
Parents:
9f10660f (diff), 73060801 (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/input.c

    r9f10660f r3aae4e8  
    5050#include "errors.h"
    5151#include "exec.h"
     52
     53extern volatile unsigned int cli_quit;
    5254
    5355/** Text input field. */
     
    107109{
    108110        char *str;
     111        int rc;
    109112
    110113        fflush(stdout);
     
    114117        console_set_style(fphone(stdout), STYLE_NORMAL);
    115118
    116         str = tinput_read(tinput);
     119        rc = tinput_read(tinput, &str);
     120        if (rc == ENOENT) {
     121                /* User requested exit */
     122                cli_quit = 1;
     123                putchar('\n');
     124                return;
     125        }
     126
     127        if (rc != EOK) {
     128                /* Error in communication with console */
     129                return;
     130        }
    117131
    118132        /* Check for empty input. */
Note: See TracChangeset for help on using the changeset viewer.