diff --git a/src/repart/repart.c b/src/repart/repart.c index ac6cccbcba..3d1846b7e8 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -10324,14 +10324,12 @@ static int vl_method_list_candidate_devices( int r; assert(link); + assert(FLAGS_SET(flags, SD_VARLINK_METHOD_MORE)); r = sd_varlink_dispatch(link, parameters, dispatch_table, &p); if (r != 0) return r; - if (!FLAGS_SET(flags, SD_VARLINK_METHOD_MORE)) - return sd_varlink_error(link, SD_VARLINK_ERROR_EXPECTED_MORE, NULL); - BlockDevice *l = NULL; size_t n = 0; CLEANUP_ARRAY(l, n, block_device_array_free); diff --git a/src/shared/varlink-io.systemd.Repart.c b/src/shared/varlink-io.systemd.Repart.c index 35b860db9e..8d50454595 100644 --- a/src/shared/varlink-io.systemd.Repart.c +++ b/src/shared/varlink-io.systemd.Repart.c @@ -59,8 +59,9 @@ static SD_VARLINK_DEFINE_METHOD_FULL( SD_VARLINK_FIELD_COMMENT("If used with the 'more' flag, a progress percentrage (specific to the work done for the specified phase+object is sent in progress updates."), SD_VARLINK_DEFINE_OUTPUT(progress, SD_VARLINK_INT, SD_VARLINK_NULLABLE)); -static SD_VARLINK_DEFINE_METHOD( +static SD_VARLINK_DEFINE_METHOD_FULL( ListCandidateDevices, + SD_VARLINK_REQUIRES_MORE, SD_VARLINK_FIELD_COMMENT("Control whether to include the root disk of the currently booted OS in the list. Defaults to false, i.e. the root disk is included."), SD_VARLINK_DEFINE_INPUT(ignoreRoot, SD_VARLINK_BOOL, SD_VARLINK_NULLABLE), SD_VARLINK_FIELD_COMMENT("Control whether to include block devices with zero size in the list, i.e. typically block devices without any inserted medium. Defaults to false, i.e. empty block devices are included."),