From: Mike Yuan Date: Sun, 15 Feb 2026 02:08:12 +0000 (+0100) Subject: repart: io.systemd.Repart.ListCandidateDevices requires 'more' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=097243cc30dd850a61be30d183dd75e403a8e986;p=thirdparty%2Fsystemd.git repart: io.systemd.Repart.ListCandidateDevices requires 'more' --- diff --git a/src/repart/repart.c b/src/repart/repart.c index ac6cccbcba2..3d1846b7e87 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 35b860db9e2..8d504545951 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."),