Changeset bab6388 in mainline for uspace/drv/test1/test1.c
- Timestamp:
- 2011-02-13T20:23:37Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7df0477e
- Parents:
- 68414f4a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/test1/test1.c
r68414f4a rbab6388 36 36 #include "test1.h" 37 37 38 static int add_device(device_t *dev);38 static int test1_add_device(device_t *dev); 39 39 40 40 static driver_ops_t driver_ops = { 41 .add_device = & add_device41 .add_device = &test1_add_device 42 42 }; 43 43 44 static driver_t t he_driver = {44 static driver_t test1_driver = { 45 45 .name = NAME, 46 46 .driver_ops = &driver_ops … … 55 55 * @param score Device match score. 56 56 */ 57 static void register_ child_verbose(device_t *parent, const char *message,57 static void register_fun_verbose(device_t *parent, const char *message, 58 58 const char *name, const char *match_id, int match_score) 59 59 { … … 89 89 * @return Error code reporting success of the operation. 90 90 */ 91 static int add_device(device_t *dev)91 static int test1_add_device(device_t *dev) 92 92 { 93 93 function_t *fun_a; … … 108 108 add_function_to_class(fun_a, "virt-null"); 109 109 } else if (str_cmp(dev->name, "test1") == 0) { 110 register_ child_verbose(dev, "cloning myself ;-)", "clone",110 register_fun_verbose(dev, "cloning myself ;-)", "clone", 111 111 "virtual&test1", 10); 112 112 } else if (str_cmp(dev->name, "clone") == 0) { 113 register_ child_verbose(dev, "run by the same task", "child",113 register_fun_verbose(dev, "run by the same task", "child", 114 114 "virtual&test1&child", 10); 115 115 } … … 123 123 { 124 124 printf(NAME ": HelenOS test1 virtual device driver\n"); 125 return driver_main(&t he_driver);125 return driver_main(&test1_driver); 126 126 } 127 127
Note:
See TracChangeset
for help on using the changeset viewer.