From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id BC858999FB for ; Tue, 14 Nov 2023 13:57:33 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 971101FB5F for ; Tue, 14 Nov 2023 13:57:03 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 14 Nov 2023 13:57:02 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 593274294F for ; Tue, 14 Nov 2023 13:57:02 +0100 (CET) Date: Tue, 14 Nov 2023 13:57:01 +0100 From: Wolfgang Bumiller To: Thomas Lamprecht Cc: Proxmox VE development discussion , Filip Schauer Message-ID: References: <20231113103037.38313-1-f.schauer@proxmox.com> <20231113103037.38313-3-f.schauer@proxmox.com> <64abdbdd-3fdd-4506-bd00-6c0b4c38455b@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <64abdbdd-3fdd-4506-bd00-6c0b4c38455b@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.102 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [tools.pm] Subject: Re: [pve-devel] applied: [PATCH v4 common 2/2] tools: Add mount flag constants X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2023 12:57:33 -0000 On Mon, Nov 13, 2023 at 03:14:47PM +0100, Thomas Lamprecht wrote: > Am 13/11/2023 um 11:30 schrieb Filip Schauer: > > Signed-off-by: Filip Schauer > > --- > > src/PVE/Tools.pm | 31 +++++++++++++++++++++++++++++++ > > 1 file changed, 31 insertions(+) > > > > > > applied this one already too, thanks! > > Albeit I'm not too happy with having those constants in PVE::Tools > in the first place, but there are so many pre-existing ones that > yours don't really make it worse. And just inventing some new > module that takes only yours is not that good either, if we need > to clean this up as a whole, and that's for a separate, future > patch series. We can probably improve the situation a bit with rust. Or generate such things from header or something... pve-container (the only current user of this) is probably a good candidate to start moving some more chunks over to rust anyway... The only thing I would have done differently here is copy-pasta the values from /usr/include/linux/mount.h without turning them into bit shifts, that way they're more "easily"™ validated (for some interpretation of "easy"), unless the bit shifted version already comes from some other trusted source? But doesn't matter much.