Changeset f97f5cc2 in mainline for uspace/srv/bd/file_bd/file_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/file_bd/file_bd.c

    r363a504 rf97f5cc2  
    9090        char *image_name;
    9191        char *device_name;
     92        category_id_t disk_cat;
    9293
    9394        printf(NAME ": File-backed block device driver\n");
     
    138139                return rc;
    139140        }
    140        
     141
     142        rc = loc_category_get_id("disk", &disk_cat, IPC_FLAG_BLOCKING);
     143        if (rc != EOK) {
     144                printf("%s: Failed resolving category 'disk'.\n", NAME);
     145                return rc;
     146        }
     147
     148        rc = loc_service_add_to_cat(service_id, disk_cat);
     149        if (rc != EOK) {
     150                printf("%s: Failed adding %s to category.",
     151                    NAME, device_name);
     152                return rc;
     153        }
     154
    141155        printf("%s: Accepting connections\n", NAME);
    142156        task_retval(0);
Note: See TracChangeset for help on using the changeset viewer.