1
0
forked from drath/libratbag

ratbagctl: drop DefaultProfile parsing

Dropped in d049c13062

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2016-02-19 14:17:42 +10:00
parent c6627d6266
commit d1ea517f9a

View File

@@ -415,7 +415,7 @@ static int show_device_print(struct ratbagctl *ctl, const char *device)
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
unsigned int prop_min_index = 0, prop_max_index = 0;
unsigned int prop_active_profile = -1, prop_default_profile = -1;
unsigned int prop_active_profile = -1;
const char *prop_id = NULL, *prop_description = NULL;
_cleanup_(freep) char *path = NULL;
int r;
@@ -494,14 +494,6 @@ static int show_device_print(struct ratbagctl *ctl, const char *device)
r = show_device_get_profile_index(ctl,
profile,
&prop_active_profile);
} else if (streq(property, "DefaultProfile")) {
r = sd_bus_message_read(reply, "v", "o", &profile);
if (r < 0)
goto exit;
r = show_device_get_profile_index(ctl,
profile,
&prop_default_profile);
} else {
r = sd_bus_message_skip(reply, "v");
}
@@ -534,11 +526,6 @@ static int show_device_print(struct ratbagctl *ctl, const char *device)
else
printf("\t Active Profile: %u\n", prop_active_profile);
if (prop_default_profile == (unsigned int)-1)
printf("\tDefault Profile: (unknown)\n");
else
printf("\tDefault Profile: %u\n", prop_default_profile);
exit:
if (r < 0)
fprintf(stderr, "Cannot show device: %s\n",