Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1dc4a5e in mainline


Ignore:
Timestamp:
2011-08-18T13:34:33Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
763e0cd
Parents:
99ac5cf
Message:

Renaming to reflect classes are gone.

Location:
uspace
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/lsusb/main.c

    r99ac5cf r1dc4a5e  
    5454static void print_found_hc(service_id_t sid, const char *path)
    5555{
    56         // printf(NAME ": host controller %zu is `%s'.\n", class_index, path);
    5756        printf("Bus %" PRIun ": %s\n", sid, path);
    5857}
    5958static void print_found_dev(usb_address_t addr, const char *path)
    6059{
    61         // printf(NAME ":     device with address %d is `%s'.\n", addr, path);
    6260        printf("  Device %02d: %s\n", addr, path);
    6361}
     
    10098        int rc;
    10199
    102         rc = loc_category_get_id(USB_HC_DDF_CLASS_NAME, &usbhc_cat, 0);
     100        rc = loc_category_get_id(USB_HC_CATEGORY, &usbhc_cat, 0);
    103101        if (rc != EOK) {
    104102                printf(NAME ": Error resolving category '%s'",
    105                     USB_HC_DDF_CLASS_NAME);
     103                    USB_HC_CATEGORY);
    106104                return 1;
    107105        }
  • uspace/drv/bus/usb/ehci/main.c

    r99ac5cf r1dc4a5e  
    101101            "Failed to bind EHCI function: %s.\n",
    102102            str_error(ret));
    103         ret = ddf_fun_add_to_class(hc_fun, USB_HC_DDF_CLASS_NAME);
     103        ret = ddf_fun_add_to_category(hc_fun, USB_HC_CATEGORY);
    104104        CHECK_RET_RETURN(ret,
    105105            "Failed to add EHCI to HC class: %s.\n",
  • uspace/drv/bus/usb/ohci/ohci.c

    r99ac5cf r1dc4a5e  
    244244            "Failed to bind OHCI device function: %s.\n", str_error(ret));
    245245
    246         ret = ddf_fun_add_to_class(instance->hc_fun, USB_HC_DDF_CLASS_NAME);
     246        ret = ddf_fun_add_to_category(instance->hc_fun, USB_HC_CATEGORY);
    247247        CHECK_RET_FINI_RETURN(ret,
    248248            "Failed to add OHCI to HC class: %s.\n", str_error(ret));
  • uspace/drv/bus/usb/uhci/uhci.c

    r99ac5cf r1dc4a5e  
    267267            str_error(ret));
    268268
    269         ret = ddf_fun_add_to_class(instance->hc_fun, USB_HC_DDF_CLASS_NAME);
     269        ret = ddf_fun_add_to_category(instance->hc_fun, USB_HC_CATEGORY);
    270270        CHECK_RET_FINI_RETURN(ret,
    271271            "Failed to add UHCI to HC class: %s.\n", str_error(ret));
  • uspace/drv/bus/usb/usbhid/kbd/kbddev.c

    r99ac5cf r1dc4a5e  
    102102
    103103const char *HID_KBD_FUN_NAME = "keyboard";
    104 const char *HID_KBD_CLASS_NAME = "keyboard";
     104const char *HID_KBD_CATEGORY_NAME = "keyboard";
    105105
    106106static void usb_kbd_set_led(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev);
     
    551551            HID_KBD_FUN_NAME, fun->handle);
    552552       
    553         usb_log_debug("Adding DDF function to class %s...\n",
     553        usb_log_debug("Adding DDF function to category %s...\n",
    554554            HID_KBD_CLASS_NAME);
    555         rc = ddf_fun_add_to_class(fun, HID_KBD_CLASS_NAME);
     555        rc = ddf_fun_add_to_category(fun, HID_KBD_CATEGORY_NAME);
    556556        if (rc != EOK) {
    557557                usb_log_error(
    558                     "Could not add DDF function to class %s: %s.\n",
     558                    "Could not add DDF function to category %s: %s.\n",
    559559                    HID_KBD_CLASS_NAME, str_error(rc));
    560560                ddf_fun_destroy(fun);
  • uspace/drv/bus/usb/usbhid/mouse/mousedev.c

    r99ac5cf r1dc4a5e  
    7474const char *HID_MOUSE_FUN_NAME = "mouse";
    7575const char *HID_MOUSE_WHEEL_FUN_NAME = "mouse-wheel";
    76 const char *HID_MOUSE_CLASS_NAME = "mouse";
    77 const char *HID_MOUSE_WHEEL_CLASS_NAME = "keyboard";
     76const char *HID_MOUSE_CATEGORY = "mouse";
     77const char *HID_MOUSE_WHEEL_CATEGORY = "keyboard";
    7878
    7979/** Default idle rate for mouses. */
     
    345345        }
    346346       
    347         usb_log_debug("Adding DDF function to class %s...\n",
    348             HID_MOUSE_CLASS_NAME);
    349         rc = ddf_fun_add_to_class(fun, HID_MOUSE_CLASS_NAME);
     347        usb_log_debug("Adding DDF function to category %s...\n",
     348            HID_MOUSE_CATEGORY);
     349        rc = ddf_fun_add_to_category(fun, HID_MOUSE_CATEGORY);
    350350        if (rc != EOK) {
    351351                usb_log_error(
    352                     "Could not add DDF function to class %s: %s.\n",
    353                     HID_MOUSE_CLASS_NAME, str_error(rc));
     352                    "Could not add DDF function to category %s: %s.\n",
     353                    HID_MOUSE_CATEGORY, str_error(rc));
    354354                ddf_fun_destroy(fun);
    355355                return rc;
     
    383383        }
    384384       
    385         usb_log_debug("Adding DDF function to class %s...\n",
    386             HID_MOUSE_WHEEL_CLASS_NAME);
    387         rc = ddf_fun_add_to_class(fun, HID_MOUSE_WHEEL_CLASS_NAME);
     385        usb_log_debug("Adding DDF function to category %s...\n",
     386            HID_MOUSE_WHEEL_CATEGORY);
     387        rc = ddf_fun_add_to_category(fun, HID_MOUSE_WHEEL_CATEGORY);
    388388        if (rc != EOK) {
    389389                usb_log_error(
    390                     "Could not add DDF function to class %s: %s.\n",
    391                     HID_MOUSE_WHEEL_CLASS_NAME, str_error(rc));
     390                    "Could not add DDF function to category %s: %s.\n",
     391                    HID_MOUSE_WHEEL_CATEGORY, str_error(rc));
    392392                ddf_fun_destroy(fun);
    393393                return rc;
  • uspace/drv/bus/usb/usbhid/mouse/mousedev.h

    r99ac5cf r1dc4a5e  
    5959
    6060const char *HID_MOUSE_FUN_NAME;
    61 const char *HID_MOUSE_CLASS_NAME;
     61const char *HID_MOUSE_CATEGORY;
    6262
    6363/*----------------------------------------------------------------------------*/
  • uspace/drv/bus/usb/usbhid/multimedia/multimedia.c

    r99ac5cf r1dc4a5e  
    205205        }
    206206       
    207         usb_log_debug("%s function created (jandle: %" PRIun ").\n",
     207        usb_log_debug("%s function created (handle: %" PRIun ").\n",
    208208            NAME, fun->handle);
    209209       
    210         rc = ddf_fun_add_to_class(fun, "keyboard");
     210        rc = ddf_fun_add_to_category(fun, "keyboard");
    211211        if (rc != EOK) {
    212212                usb_log_error(
    213                     "Could not add DDF function to class 'keyboard': %s.\n",
     213                    "Could not add DDF function to category 'keyboard': %s.\n",
    214214                    str_error(rc));
    215215                // TODO: Can / should I destroy the DDF function?
  • uspace/drv/bus/usb/usbhub/usbhub.c

    r99ac5cf r1dc4a5e  
    131131        opResult = ddf_fun_bind(hub_fun);
    132132        assert(opResult == EOK);
    133         opResult = ddf_fun_add_to_class(hub_fun, "hub");
     133        opResult = ddf_fun_add_to_category(hub_fun, "hub");
    134134        assert(opResult == EOK);
    135135
  • uspace/drv/bus/usb/usbmouse/init.c

    r99ac5cf r1dc4a5e  
    116116       
    117117        /* Add the function to mouse class. */
    118         rc = ddf_fun_add_to_class(mouse->mouse_fun, "mouse");
     118        rc = ddf_fun_add_to_category(mouse->mouse_fun, "mouse");
    119119        if (rc != EOK)
    120120                goto leave;
  • uspace/drv/bus/usb/vhc/main.c

    r99ac5cf r1dc4a5e  
    104104        }
    105105
    106         rc = ddf_fun_add_to_class(hc, USB_HC_DDF_CLASS_NAME);
     106        rc = ddf_fun_add_to_category(hc, USB_HC_CATEGORY);
    107107        if (rc != EOK) {
    108108                usb_log_fatal("Failed to add function to HC class: %s.\n",
  • uspace/drv/char/ns8250/ns8250.c

    r99ac5cf r1dc4a5e  
    781781        ns->fun = fun;
    782782       
    783         ddf_fun_add_to_class(fun, "serial");
     783        ddf_fun_add_to_category(fun, "serial");
    784784       
    785785        ddf_msg(LVL_NOTE, "Device %s successfully initialized.",
  • uspace/drv/test/test1/test1.c

    r99ac5cf r1dc4a5e  
    143143        }
    144144
    145         ddf_fun_add_to_class(fun_a, "virtual");
     145        ddf_fun_add_to_category(fun_a, "virtual");
    146146
    147147        if (str_cmp(dev->name, "null") == 0) {
    148148                fun_a->ops = &char_device_ops;
    149                 ddf_fun_add_to_class(fun_a, "virt-null");
     149                ddf_fun_add_to_category(fun_a, "virt-null");
    150150        } else if (str_cmp(dev->name, "test1") == 0) {
    151151                (void) register_fun_verbose(dev,
  • uspace/drv/test/test2/test2.c

    r99ac5cf r1dc4a5e  
    123123        }
    124124
    125         ddf_fun_add_to_class(fun_a, "virtual");
     125        ddf_fun_add_to_category(fun_a, "virtual");
    126126
    127127        return EOK;
  • uspace/drv/test/test3/test3.c

    r99ac5cf r1dc4a5e  
    5050};
    5151
    52 static int register_fun_and_add_to_class(ddf_dev_t *parent,
     52static int register_fun_and_add_to_category(ddf_dev_t *parent,
    5353     const char *base_name, size_t index, const char *class_name)
    5454{
     
    7777        }
    7878       
    79         ddf_fun_add_to_class(fun, class_name);
     79        ddf_fun_add_to_category(fun, class_name);
    8080
    8181        ddf_msg(LVL_NOTE, "Registered exposed function `%s'.", fun_name);
     
    100100        size_t i;
    101101        for (i = 0; i < 20; i++) {
    102                 rc = register_fun_and_add_to_class(dev,
     102                rc = register_fun_and_add_to_category(dev,
    103103                    "test3_", i, "test3");
    104104                if (rc != EOK) {
  • uspace/lib/c/generic/devman.c

    r99ac5cf r1dc4a5e  
    271271}
    272272
    273 int devman_add_device_to_class(devman_handle_t devman_handle,
    274     const char *class_name)
     273int devman_add_device_to_category(devman_handle_t devman_handle,
     274    const char *cat_name)
    275275{
    276276        async_exch_t *exch = devman_exchange_begin_blocking(DEVMAN_DRIVER);
    277277       
    278278        ipc_call_t answer;
    279         aid_t req = async_send_1(exch, DEVMAN_ADD_DEVICE_TO_CLASS,
     279        aid_t req = async_send_1(exch, DEVMAN_ADD_DEVICE_TO_CATEGORY,
    280280            devman_handle, &answer);
    281         sysarg_t retval = async_data_write_start(exch, class_name,
    282             str_size(class_name));
     281        sysarg_t retval = async_data_write_start(exch, cat_name,
     282            str_size(cat_name));
    283283       
    284284        devman_exchange_end(exch);
  • uspace/lib/c/include/devman.h

    r99ac5cf r1dc4a5e  
    5959extern int devman_get_device_path(devman_handle_t, char *, size_t);
    6060
    61 extern int devman_add_device_to_class(devman_handle_t, const char *);
     61extern int devman_add_device_to_category(devman_handle_t, const char *);
    6262extern int devman_fun_sid_to_handle(service_id_t, devman_handle_t *);
    6363
  • uspace/lib/c/include/ipc/devman.h

    r99ac5cf r1dc4a5e  
    138138        DEVMAN_ADD_FUNCTION,
    139139        DEVMAN_ADD_MATCH_ID,
    140         DEVMAN_ADD_DEVICE_TO_CLASS
     140        DEVMAN_ADD_DEVICE_TO_CATEGORY
    141141
    142142} driver_to_devman_t;
  • uspace/lib/drv/generic/driver.c

    r99ac5cf r1dc4a5e  
    635635}
    636636
    637 /** Add exposed function to class.
     637/** Add exposed function to category.
    638638 *
    639639 * Must only be called when the function is bound.
    640640 */
    641 int ddf_fun_add_to_class(ddf_fun_t *fun, const char *class_name)
     641int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
    642642{
    643643        assert(fun->bound == true);
    644644        assert(fun->ftype == fun_exposed);
    645645       
    646         return devman_add_device_to_class(fun->handle, class_name);
     646        return devman_add_device_to_category(fun->handle, cat_name);
    647647}
    648648
  • uspace/lib/drv/include/ddf/driver.h

    r99ac5cf r1dc4a5e  
    151151extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int);
    152152
    153 extern int ddf_fun_add_to_class(ddf_fun_t *, const char *);
     153extern int ddf_fun_add_to_category(ddf_fun_t *, const char *);
    154154
    155155#endif
  • uspace/lib/usb/include/usb/usb.h

    r99ac5cf r1dc4a5e  
    174174} usb_packet_id;
    175175
    176 /** Class name for USB host controllers. */
    177 #define USB_HC_DDF_CLASS_NAME "usbhc"
     176/** Category for USB host controllers. */
     177#define USB_HC_CATEGORY "usbhc"
    178178
    179179#endif
  • uspace/srv/devman/main.c

    r99ac5cf r1dc4a5e  
    332332}
    333333
    334 static void devman_add_function_to_class(ipc_callid_t callid, ipc_call_t *call)
     334static void devman_add_function_to_cat(ipc_callid_t callid, ipc_call_t *call)
    335335{
    336336        devman_handle_t handle = IPC_GET_ARG1(*call);
     
    338338        int rc;
    339339       
    340         /* Get class name. */
    341         char *class_name;
    342         rc = async_data_write_accept((void **) &class_name, true,
     340        /* Get category name. */
     341        char *cat_name;
     342        rc = async_data_write_accept((void **) &cat_name, true,
    343343            0, 0, 0, 0);
    344344        if (rc != EOK) {
     
    353353        }
    354354       
    355         rc = loc_category_get_id(class_name, &cat_id, IPC_FLAG_BLOCKING);
     355        rc = loc_category_get_id(cat_name, &cat_id, IPC_FLAG_BLOCKING);
    356356        if (rc == EOK) {
    357357                loc_service_add_to_cat(fun->service_id, cat_id);
    358358        } else {
    359359                log_msg(LVL_ERROR, "Failed adding function `%s' to category "
    360                     "`%s'.", fun->pathname, class_name);
    361         }
    362        
    363         log_msg(LVL_NOTE, "Function `%s' added to class `%s'.",
    364             fun->pathname, class_name);
     360                    "`%s'.", fun->pathname, cat_name);
     361        }
     362       
     363        log_msg(LVL_NOTE, "Function `%s' added to category `%s'.",
     364            fun->pathname, cat_name);
    365365
    366366        async_answer_0(callid, EOK);
     
    416416                        devman_add_function(callid, &call);
    417417                        break;
    418                 case DEVMAN_ADD_DEVICE_TO_CLASS:
    419                         devman_add_function_to_class(callid, &call);
     418                case DEVMAN_ADD_DEVICE_TO_CATEGORY:
     419                        devman_add_function_to_cat(callid, &call);
    420420                        break;
    421421                default:
Note: See TracChangeset for help on using the changeset viewer.