From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 57D4E1FF38E
	for <inbox@lore.proxmox.com>; Tue, 11 Jun 2024 12:56:09 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 2FB5D35530;
	Tue, 11 Jun 2024 12:56:43 +0200 (CEST)
Date: Mon, 10 Jun 2024 10:48:20 +0900
To: Fiona Ebner <f.ebner@proxmox.com>
In-Reply-To: <3d128b6a-9708-47ed-9313-04d25e4cc2ce@proxmox.com>
References: <20240607094734.3883693-1-jing@jing.rocks>
 <3d128b6a-9708-47ed-9313-04d25e4cc2ce@proxmox.com>
X-Mailman-Approved-At: Tue, 11 Jun 2024 12:56:41 +0200
MIME-Version: 1.0
Message-ID: <mailman.546.1718103401.319.pve-devel@lists.proxmox.com>
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Post: <mailto:pve-devel@lists.proxmox.com>
From: Jing Luo via pve-devel <pve-devel@lists.proxmox.com>
Precedence: list
Cc: Jing Luo <jing@jing.rocks>, pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
X-BeenThere: pve-devel@lists.proxmox.com
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
Subject: Re: [pve-devel] [PATCH pve-qemu-kvm] patch: pbs block driver:
 correct a data type
Content-Type: multipart/mixed; boundary="===============1288425792977404365=="
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)

--===============1288425792977404365==
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <jing@jing.rocks>
X-Original-To: pve-devel@lists.proxmox.com
Delivered-To: pve-devel@lists.proxmox.com
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by lists.proxmox.com (Postfix) with ESMTPS id E15F9C8EA3
	for <pve-devel@lists.proxmox.com>; Mon, 10 Jun 2024 03:49:07 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id A9ECECCC6
	for <pve-devel@lists.proxmox.com>; Mon, 10 Jun 2024 03:48:37 +0200 (CEST)
Received: from mail-gw3.jing.rocks (mail-gw3.jing.rocks [219.117.250.209])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by firstgate.proxmox.com (Proxmox) with ESMTPS
	for <pve-devel@lists.proxmox.com>; Mon, 10 Jun 2024 03:48:34 +0200 (CEST)
Received: from mail-gw3.jing.rocks (localhost [127.0.0.1])
	by mail-gw3.jing.rocks (Proxmox) with ESMTP id 4F1B026193;
	Mon, 10 Jun 2024 10:48:23 +0900 (JST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jing.rocks; h=cc
	:cc:content-type:content-type:date:from:from:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to; s=mail-gw; bh=rBcidgaAx3kACmATVlM/5I8AjQ+7iYR86R8XedxW9gI=; b=
	iMEUQGmMIN5pkYFVh4ndfHSbaMUAS19ClxNFjvzFObrl6L7Ahgd3ThqJH6Cpy1v0
	kWxtLzKJVUSz/Eqlus8CurU2WQy/m08cgKB7R9Euuf5Ucje/Mfn5kc7XjFoFD+X7
	POjOZXoaMehBL9z3URAeox6AGpz+YHFzTUc6xTdR/wxmKMvfuK/Z/O6SZNNmGcVn
	aQuJnxHlZHIS0VqQ4FUrT7z2hHoO45m1BFux0vnHxxMGPrgoX0MN93xxuxUn0jz7
	Q0rhjjMQKIVWQrE+EawyFcs+26/SZG8bjdIEpRj6C7jwn/8x5EFhvsmINWdOkTo0
	zXgjKZojA7yh3Y4GQHLmWg==
Received: from mail.jing.rocks (mail.jing.rocks [192.168.0.222])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mail-gw3.jing.rocks (Proxmox) with ESMTPS id 48BE425FF8;
	Mon, 10 Jun 2024 10:48:21 +0900 (JST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=jing.rocks;
	s=default; t=1717984101;
	bh=qNrwkOabYTvfoliR+5zr476GF+eBV0HV8g8U8xBogsQ=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
	b=ks4SpUS1VKyeO86f2CfNSY1e5aXf7HlL0aQoqjf82xEtRfsLsK2SBDXWfKETPRYTC
	 t+eZCti6talwpQgpv8iyVsl2pjWC5pFHzgMlttODCMgjKqdIRjFKYJESjIiurkuyAR
	 w9quhJ2xP77SyfreCU4he5hpb3xm/kG8XRe+XJ4k7DC5UCM/blXGbBiYzVHK4XQYkP
	 VefXF6UxU/jxSYnnavgn68kaAiG1UEZb4rB7sZSAIZInPAgqLDQvRbOTS6m/BELm6X
	 5Mrz3cVqeOBVYnicxLSIxXhduIlHm9OJbY3eynQSENyUXXIdO8cBiTqWaRayJRMzfu
	 otevzmty2MQtQ==
Received: from mail.jing.rocks (localhost [127.0.0.1])
	(Authenticated sender: jing@jing.rocks)
	by mail.jing.rocks (Postfix) with ESMTPSA id 3176637FB2;
	Mon, 10 Jun 2024 10:48:21 +0900 (JST)
MIME-Version: 1.0
Date: Mon, 10 Jun 2024 10:48:20 +0900
From: Jing Luo <jing@jing.rocks>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH pve-qemu-kvm] patch: pbs block driver: correct a data type
In-Reply-To: <3d128b6a-9708-47ed-9313-04d25e4cc2ce@proxmox.com>
References: <20240607094734.3883693-1-jing@jing.rocks>
 <3d128b6a-9708-47ed-9313-04d25e4cc2ce@proxmox.com>
Message-ID: <57a95560b7c8bce55d2e8270d18d9778@jing.rocks>
X-Sender: jing@jing.rocks
Content-Type: multipart/signed;
 protocol="application/pgp-signature";
 boundary="=_7fa70c0b69d1063ee818a7cec08966e6";
 micalg=pgp-sha512
X-SPAM-LEVEL: Spam detection results:  0
	BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
	DKIM_SIGNED               0.1 Message has a DKIM or DK signature, not necessarily valid
	DKIM_VALID               -0.1 Message has at least one valid DKIM or DK signature
	DKIM_VALID_AU            -0.1 Message has a valid DKIM or DK signature from author's domain
	DKIM_VALID_EF            -0.1 Message has a valid DKIM or DK signature from envelope-from domain
	DMARC_PASS               -0.1 DMARC pass policy
	KAM_INFOUSMEBIZ          0.75 Prevalent use of .info|.us|.me|.me.uk|.biz|xyz|id|rocks|life domains in spam/malware
	KAM_OTHER_BAD_TLD        0.75 Other untrustworthy TLDs
	SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
	SPF_PASS               -0.001 SPF: sender matches SPF record
	T_SCC_BODY_TEXT_LINE    -0.01 -
X-Mailman-Approved-At: Tue, 11 Jun 2024 12:56:41 +0200

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)

--=_7fa70c0b69d1063ee818a7cec08966e6
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

On 2024-06-07 20:49, Fiona Ebner wrote:
> Hi,
> 
> if you haven't already done so, please send a signed copy of the 
> Harmony
> CLA to office@proxmox.com, see [0].

Hi, thanks for letting me know, this was done some time last week.

> Am 07.06.24 um 11:43 schrieb Jing Luo:
>> gcc warns (-Werror=type-limits) that it will always be false for the
>> if statement. This is because here s->aid is defined as char, while
>> proxmox_restore_open_image() returns an int. Change the type to int.
>> Strangely gcc warns it on arm64 build but not amd64 build...
>> 
> 
> Thank you for the report!
> 
>> Signed-off-by: Jing Luo <jing@jing.rocks>
>> ---
>>  ...2-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch | 2 
>> +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git 
>> a/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch 
>> b/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
>> index b9578ba..9e68167 100644
>> --- 
>> a/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
>> +++ 
>> b/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
>> @@ -68,7 +68,7 @@ index 0000000000..dd72356bd3
>>  +
>>  +typedef struct {
>>  +    ProxmoxRestoreHandle *conn;
>> -+    char aid;
>> ++    int aid;
>>  +    int64_t length;
>>  +
>>  +    char *repository;
> 
> I'd rather make it an explicit uint8_t here (because that is the type
> for other functions taking the aid as a parameter, e.g.
> proxmox_restore_get_image_length()). And to fix the original issue, I'd
> use the ret variable to store the result from
> proxmox_restore_open_image() and only assign to s->aid after checking
> that the returned value is not an error and that it is small enough to
> fit into uint8_t.
> 
> [0]:
> https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright

Thanks. I'm more of a sysadmin than a programmer but I'll try my best. I 
might send a v2 patch in a few days. (Unless I need an urgent surgery to 
take out the fish bone deeply stuck in my throat since last 
Friday...I'll find out if I need the surgery after meeting with my 
doctor today:)


-- 
Jing Luo
About me: https://jing.rocks/about/
PGP Fingerprint: 4E09 8D19 00AA 3F72 1899 2614 09B3 316E 13A1 1EFC

--=_7fa70c0b69d1063ee818a7cec08966e6
Content-Type: application/pgp-signature;
 name=signature.asc
Content-Disposition: attachment;
 filename=signature.asc;
 size=228
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQQUNK5y7dM5LGmlOjiPRdGe/wwPKwUCZmZbZAAKCRCPRdGe/wwP
K523AP9xJlFqhMLuIXC0YhxZITS07tQUa4ACU6oOq1TuGr0SDQEAxhLrm9esRT+9
oxJ2Pw/AnjK6HK/VVgDsolIwXH4spAY=
=Vs3A
-----END PGP SIGNATURE-----

--=_7fa70c0b69d1063ee818a7cec08966e6--



--===============1288425792977404365==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

--===============1288425792977404365==--