]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/JSONSchema.pm
render_bytes: check format, untaint before calling sprintf
[pve-common.git] / src / PVE / JSONSchema.pm
index 793ec60c7465d27a04359b7d3387c17054fbf18b..06c500f0554bd491735a6137bf3c22f4880b733e 100644 (file)
@@ -105,6 +105,14 @@ register_standard_option('fingerprint-sha256', {
     pattern => '([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}',
 });
 
+register_standard_option('pve-output-format', {
+    type => 'string',
+    description => 'Output format.',
+    enum => [ 'text', 'json', 'json-pretty', 'yaml' ],
+    optional => 1,
+    default => 'text',
+});
+
 my $format_list = {};
 
 sub register_format {