]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/JSONSchema.pm
JSONSchema::check_type: return success (not value)
[pve-common.git] / src / PVE / JSONSchema.pm
index 4ea9007c21e344c024d6ad72ec16f8f920428e68..936c3cfa7feeea0527ef19e963858374c02db99f 100644 (file)
@@ -84,6 +84,12 @@ register_standard_option('pve-config-digest', {
     maxLength => 40, # sha1 hex digest lenght is 40
 });
 
+register_standard_option('skiplock', {
+    description => "Ignore locks - only root is allowed to use this option.",
+    type => 'boolean',
+    optional => 1,
+});
+
 register_standard_option('extra-args', {
     description => "Extra arguments as array",
     type => 'array',
@@ -672,7 +678,7 @@ sub check_type {
                        return 1;
                    #} elsif ($value =~ m/^(0|false|no|off)$/i) {
                    } elsif ($value eq '0') {
-                       return 0;
+                       return 1; # return success (not value)
                    } else {
                        add_error($errors, $path, "type check ('$type') failed - got '$value'");
                        return undef;