Changeset 25eec4e in mainline for uspace/app/klog/klog.c


Ignore:
Timestamp:
2013-04-19T18:38:18Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6d717a4
Parents:
a1e2df13 (diff), 289cb7dd (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 chages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/klog/klog.c

    ra1e2df13 r25eec4e  
    4848#include <adt/list.h>
    4949#include <adt/prodcons.h>
     50#include <tinput.h>
    5051
    5152#define NAME       "klog"
     
    228229        }
    229230       
     231        tinput_t *input = tinput_new();
     232        if (!input) {
     233                fprintf(stderr, "%s: Could not create input\n", NAME);
     234                return ENOMEM;
     235        }       
     236
    230237        fibril_add_ready(fid);
    231238        event_unmask(EVENT_KLOG);
    232239        klog_update();
    233240       
    234         task_retval(0);
    235         async_manager();
    236        
    237         return 0;
     241        tinput_set_prompt(input, "klog> ");
     242
     243        char *str;
     244        while ((rc = tinput_read(input, &str)) == EOK) {
     245                if (str_cmp(str, "") == 0) {
     246                        free(str);
     247                        continue;
     248                }
     249
     250                klog_command(str, str_size(str));
     251                free(str);
     252        }
     253 
     254        if (rc == ENOENT)
     255                rc = EOK;       
     256
     257        return EOK;
    238258}
    239259
Note: See TracChangeset for help on using the changeset viewer.