mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 10:13:34 +08:00
mntwork: shorten code
This commit is contained in:
parent
0557f82650
commit
9c56a3629f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user