summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2014-09-10 09:15:29 +0200
committerVincent Guittot <vincent.guittot@linaro.org>2014-09-10 09:41:55 +0200
commit101a6f17cca9c4274c43a4b77963c92652e1ba91 (patch)
tree077493fb9ea5aa116e94aa9fca31abf46dc7ef8d /src
parente8d72db66ea1a1659ab60d046b2e9ef3805480ed (diff)
remove backward compatibility for resources
Diffstat (limited to 'src')
-rw-r--r--src/rt-app_parse_config.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c
index 6f2d64a..8940318 100644
--- a/src/rt-app_parse_config.c
+++ b/src/rt-app_parse_config.c
@@ -238,23 +238,6 @@ parse_resource_data(char *name, struct json_object *obj, int idx,
}
}
-static void parse_legacy_resources(int nresources, rtapp_options_t *opts)
-{
- int i;
- char name[5];
-
- log_info(PIN "Creating %d mutex resources", nresources);
-
- opts->resources = malloc(sizeof(rtapp_resource_t) * nresources);
- for (i = 0; i < nresources; i++) {
- opts->resources[i].index = i;
- snprintf(name, 5, "%d", i);
- opts->resources[i].name = strdup(name);
- init_mutex_resource(&opts->resources[i], opts);
- }
- opts->nresources = nresources;
-}
-
static void
parse_resources(struct json_object *resources, rtapp_options_t *opts)
{
@@ -266,10 +249,7 @@ parse_resources(struct json_object *resources, rtapp_options_t *opts)
log_info(PFX "Parsing resource section");
- if (json_object_is_type(resources, json_type_int)) {
- parse_legacy_resources(json_object_get_int(resources), opts);
- }
- else {
+ if (json_object_is_type(resources, json_type_object)) {
opts->nresources = 0;
foreach(resources, entry, key, val, idx) {
opts->nresources++;