Changeset c621f4aa in mainline for uspace/app/klog


Ignore:
Timestamp:
2010-07-25T10:11:13Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
377cce8
Parents:
24a2517 (diff), a2da43c (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 with mainline.

Location:
uspace/app/klog
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/klog/Makefile

    r24a2517 rc621f4aa  
    2929
    3030USPACE_PREFIX = ../..
    31 LIBS = $(LIBC_PREFIX)/libc.a
    32 
    33 OUTPUT = klog
     31BINARY = klog
    3432
    3533SOURCES = \
    3634        klog.c
    3735
    38 include ../Makefile.common
     36include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/klog/klog.c

    r24a2517 rc621f4aa  
    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.