mntwork: shorten code

This commit is contained in:
Lennart Poettering 2024-11-08 23:07:00 +01:00
parent 0557f82650
commit 9c56a3629f

View File

@ -522,17 +522,13 @@ static int vl_method_mount_image(
loop_device_relinquish(loop);
r = sd_varlink_replybo(
return sd_varlink_replybo(
link,
SD_JSON_BUILD_PAIR("partitions", SD_JSON_BUILD_VARIANT(aj)),
SD_JSON_BUILD_PAIR("imagePolicy", SD_JSON_BUILD_STRING(ps)),
SD_JSON_BUILD_PAIR("imageSize", SD_JSON_BUILD_INTEGER(di->image_size)),
SD_JSON_BUILD_PAIR("sectorSize", SD_JSON_BUILD_INTEGER(di->sector_size)),
SD_JSON_BUILD_PAIR_CONDITION(!sd_id128_is_null(di->image_uuid), "imageUuid", SD_JSON_BUILD_UUID(di->image_uuid)));
if (r < 0)
return r;
return r;
}
static int process_connection(sd_varlink_server *server, int _fd) {