Changeset f97f5cc2 in mainline for uspace/srv/bd/sata_bd/sata_bd.c


Ignore:
Timestamp:
2015-11-17T23:23:08Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4627314
Parents:
363a504
Message:

Enable partition support with all disk drivers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/sata_bd/sata_bd.c

    r363a504 rf97f5cc2  
    246246{
    247247        int rc;
     248        category_id_t disk_cat;
    248249       
    249250        async_set_fallback_port_handler(sata_bd_connection, NULL);
     
    259260        }
    260261
    261         for(int i=0; i < disk_count; i++) {
     262        rc = loc_category_get_id("disk", &disk_cat, IPC_FLAG_BLOCKING);
     263        if (rc != EOK) {
     264                printf("%s: Failed resolving category 'disk'.\n", NAME);
     265                return rc;
     266        }
     267
     268        for(int i = 0; i < disk_count; i++) {
    262269                char name[1024];
    263270                snprintf(name, 1024, "%s/%s", NAMESPACE, disk[i].dev_name);
     
    267274                        return rc;
    268275                }
    269         }
    270                
     276
     277                rc = loc_service_add_to_cat(disk[i].service_id, disk_cat);
     278                if (rc != EOK) {
     279                        printf("%s: Failed adding %s to category.",
     280                            NAME, disk[i].dev_name);
     281                        return rc;
     282                }
     283        }
     284
    271285        printf(NAME ": Accepting connections\n");
    272286        task_retval(0);
Note: See TracChangeset for help on using the changeset viewer.