Hi, > > +PVE::JSONSchema::register_format('pve-qm-memory-max', > > \&verify_qm_memory_max); > > +sub verify_qm_memory_max { > > + my ($max, $noerr) = @_; > > + > > + return if $noerr; > > $noerr only switches if the function should die upon error or return > undef upon error. But if there is no error, you always need to return > the verified value, i.e. $max. >
I'm a bit lost here. I have looked at other verify subs, and I don't have find a single one returning a value on noerr. All other verify subs have something like: if ($max % 65536 != 0) { return if $noerr; die "max memory need to be a multiple of 64GiB\n"; } Could you provide me a code sample of what you want exactly here ? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel