Changeset d9fae235 in mainline for uspace/app/klog/klog.c


Ignore:
Timestamp:
2010-04-17T01:28:38Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9d6bfa5
Parents:
9256ad29
Message:

sysinfo overhaul

  • cleanup (nicer data structures, use of SLAB allocator)
  • add support for storing arbitrary binary data
  • properly reimplement non-constant values (generated by functions)
  • add support for non-constant subtrees (generated by functions)
  • syscall ABI change, libc API change
  • reflect changes in user code

libc: task_spawn() can now return error code

  • reflect change in user code, print error strings after failed task_spawn()

uspace cleanup

  • more use of string and other constants
  • more use of str_error()
  • unify error reporting in init
File:
1 edited

Legend:

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

    r9256ad29 rd9fae235  
    6464int main(int argc, char *argv[])
    6565{
    66         size_t klog_pages = sysinfo_value("klog.pages");
     66        size_t klog_pages;
     67        if (sysinfo_get_value("klog.pages", &klog_pages) != EOK) {
     68                printf("%s: Error getting klog address\n", NAME);
     69                return -1;
     70        }
     71       
    6772        size_t klog_size = klog_pages * PAGE_SIZE;
    6873        klog_length = klog_size / sizeof(wchar_t);
     
    7075        klog = (wchar_t *) as_get_mappable_page(klog_size);
    7176        if (klog == NULL) {
    72                 printf(NAME ": Error allocating memory area\n");
     77                printf("%s: Error allocating memory area\n", NAME);
    7378                return -1;
    7479        }
     
    7782            klog_size, SERVICE_MEM_KLOG);
    7883        if (res != EOK) {
    79                 printf(NAME ": Error initializing memory area\n");
     84                printf("%s: Error initializing memory area\n", NAME);
    8085                return -1;
    8186        }
    8287       
    8388        if (event_subscribe(EVENT_KLOG, 0) != EOK) {
    84                 printf(NAME ": Error registering klog notifications\n");
     89                printf("%s: Error registering klog notifications\n", NAME);
    8590                return -1;
    8691        }
Note: See TracChangeset for help on using the changeset viewer.