mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 17:20:30 +00:00
parse_drive : return correct format
Currently format is always empty, we need to parse file extension Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
3732918544
commit
bdf3f36209
@ -900,6 +900,10 @@ sub parse_drive {
|
||||
|
||||
return undef if !$res->{file};
|
||||
|
||||
if($res->{file} =~ m/\.(raw|cow|qcow|qcow2|vmdk|cloop)$/){
|
||||
$res->{format} = $1;
|
||||
}
|
||||
|
||||
return undef if $res->{cache} &&
|
||||
$res->{cache} !~ m/^(off|none|writethrough|writeback|unsafe|directsync)$/;
|
||||
return undef if $res->{snapshot} && $res->{snapshot} !~ m/^(on|off)$/;
|
||||
|
Loading…
Reference in New Issue
Block a user