Changeset 44ea48e in mainline


Ignore:
Timestamp:
2024-09-05T20:56:28Z (11 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
e192339
Parents:
68e357e
Message:

hr: register hr array under "devices/XXXX"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/util.c

    r68e357e r44ea48e  
    3939#include <io/log.h>
    4040#include <loc.h>
     41#include <stdlib.h>
     42#include <stdio.h>
    4143#include <str_error.h>
    4244
     
    8385        service_id_t new_id;
    8486        category_id_t cat_id;
     87        char *fullname = NULL;
    8588
    86         rc = loc_service_register(hr_srv, new_volume->devname, &new_id);
     89        if (asprintf(&fullname, "devices/%s", new_volume->devname) < 0)
     90                return ENOMEM;
     91
     92        rc = loc_service_register(hr_srv, fullname, &new_id);
    8793        if (rc != EOK) {
    8894                log_msg(LOG_DEFAULT, LVL_ERROR,
     
    110116
    111117error:
     118        free(fullname);
    112119        return rc;
    113120}
Note: See TracChangeset for help on using the changeset viewer.