From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 80A681FF0AF for ; Wed, 09 Sep 2026 13:12:35 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 6C732215D3; Wed, 09 Sep 2026 13:12:34 +0200 (CEST) From: Erik Fastermann To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 4/5] api: s3: drop unused rpcenv parameter from bucket listing Date: Wed, 9 Sep 2026 13:12:27 +0200 Message-ID: <20260909111228.217535-5-e.fastermann@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260909111228.217535-1-e.fastermann@proxmox.com> References: <20260909111228.217535-1-e.fastermann@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL -0.456 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: WIC77ZVKKGB2MQCKZQRXVKDZNZ6BTZSI X-Message-ID-Hash: WIC77ZVKKGB2MQCKZQRXVKDZNZ6BTZSI X-MailFrom: efastermann@ruth.proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Erik Fastermann X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The bucket listing never touched the RPC environment, and the API macro does not require handlers to accept one. Dropping it allows callers without an RPC environment to use the function directly. No functional change intended. Signed-off-by: Erik Fastermann --- src/api2/config/s3.rs | 5 +---- src/bin/proxmox_backup_manager/s3.rs | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/api2/config/s3.rs b/src/api2/config/s3.rs index 9cf61d23d..3e6599f53 100644 --- a/src/api2/config/s3.rs +++ b/src/api2/config/s3.rs @@ -358,10 +358,7 @@ pub fn delete_s3_client_config( }, )] /// List buckets accessible by given s3 client configuration -pub async fn list_buckets( - id: String, - _rpcenv: &mut dyn RpcEnvironment, -) -> Result, Error> { +pub async fn list_buckets(id: String) -> Result, Error> { let (config, _digest) = pbs_config::s3::config()?; let config: S3ClientConf = config .lookup(S3_CFG_TYPE_ID, &id) diff --git a/src/bin/proxmox_backup_manager/s3.rs b/src/bin/proxmox_backup_manager/s3.rs index 046b12dd0..b86f5d625 100644 --- a/src/bin/proxmox_backup_manager/s3.rs +++ b/src/bin/proxmox_backup_manager/s3.rs @@ -45,11 +45,8 @@ async fn check( }, )] /// List buckets accessible by the given S3 client configuration -async fn list_buckets( - s3_endpoint_id: String, - rpcenv: &mut dyn RpcEnvironment, -) -> Result, Error> { - api2::config::s3::list_buckets(s3_endpoint_id, rpcenv).await +async fn list_buckets(s3_endpoint_id: String) -> Result, Error> { + api2::config::s3::list_buckets(s3_endpoint_id).await } #[api( -- 2.47.3