Changeset d9fae235 in mainline for uspace/srv/hid/kbd/generic/kbd.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/srv/hid/kbd/generic/kbd.c

    r9256ad29 rd9fae235  
    212212int main(int argc, char **argv)
    213213{
    214         printf(NAME ": HelenOS Keyboard service\n");
    215        
    216         if (sysinfo_value("kbd.cir.fhc") == 1)
     214        printf("%s: HelenOS Keyboard service\n", NAME);
     215       
     216        sysarg_t fhc;
     217        sysarg_t obio;
     218       
     219        if ((sysinfo_get_value("kbd.cir.fhc", &fhc) == EOK) && (fhc))
    217220                cir_service = SERVICE_FHC;
    218         else if (sysinfo_value("kbd.cir.obio") == 1)
     221        else if ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio))
    219222                cir_service = SERVICE_OBIO;
    220223       
     
    240243        int rc = devmap_driver_register(NAME, client_connection);
    241244        if (rc < 0) {
    242                 printf(NAME ": Unable to register driver (%d)\n", rc);
     245                printf("%s: Unable to register driver (%d)\n", NAME, rc);
    243246                return -1;
    244247        }
     
    249252        dev_handle_t dev_handle;
    250253        if (devmap_device_register(kbd, &dev_handle) != EOK) {
    251                 printf(NAME ": Unable to register device %s\n", kbd);
     254                printf("%s: Unable to register device %s\n", NAME, kbd);
    252255                return -1;
    253256        }
Note: See TracChangeset for help on using the changeset viewer.