[pve-devel] applied: [PATCH v4 common 2/2] tools: Add mount flag constants

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Nov 14 13:57:01 CET 2023

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 <f.schauer at proxmox.com>
> > ---
> >  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.

More information about the pve-devel mailing list