Changeset 979c5729 in mainline
- Timestamp:
- 2011-12-09T17:32:42Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f44ba92
- Parents:
- dd28c1a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/i8042.c
rdd28c1a r979c5729 116 116 int main(int argc, char *argv[]) 117 117 { 118 char name[16];119 int i, rc;120 const char dchar[MAX_DEVS] = { 'a', 'b' };121 122 118 printf(NAME ": i8042 PS/2 port driver\n"); 123 119 124 rc = loc_server_register(NAME, i8042_connection);120 int rc = loc_server_register(NAME, i8042_connection); 125 121 if (rc < 0) { 126 122 printf(NAME ": Unable to register server.\n"); … … 131 127 return -1; 132 128 133 for (i = 0; i < MAX_DEVS; i++) {129 for (int i = 0; i < MAX_DEVS; i++) { 134 130 device.port[i].client_sess = NULL; 135 131 136 snprintf(name, 16, "%s/ps2%c", NAMESPACE, dchar[i]); 137 rc = loc_service_register(name, &device.port[i].service_id); 132 static const char *names[MAX_DEVS] = { 133 NAMESPACE "/ps2a", NAMESPACE "/ps2b"}; 134 rc = loc_service_register(names[i], &device.port[i].service_id); 138 135 if (rc != EOK) { 139 printf(NAME ": Unable to register device %s.\n", name); 136 printf(NAME ": Unable to register device %s.\n", 137 names[i]); 140 138 return rc; 141 139 } 142 printf(NAME ": Registered device %s\n", name );140 printf(NAME ": Registered device %s\n", names[i]); 143 141 } 144 142
Note:
See TracChangeset
for help on using the changeset viewer.