| 1 | #################################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||||||||||||||||
| 3 | # This file was generated using XDR::Parse version v1.0.1, | ||||||||||||||||||||||||||||||||||||||||||
| 4 | # XDR::Gen version 1.1.2 and LibVirt version v12.9.0 | ||||||||||||||||||||||||||||||||||||||||||
| 5 | # | ||||||||||||||||||||||||||||||||||||||||||
| 6 | # Don't edit this file, use the source template instead | ||||||||||||||||||||||||||||||||||||||||||
| 7 | # | ||||||||||||||||||||||||||||||||||||||||||
| 8 | # ANY CHANGES HERE WILL BE LOST ! | ||||||||||||||||||||||||||||||||||||||||||
| 9 | # | ||||||||||||||||||||||||||||||||||||||||||
| 10 | #################################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use v5.14; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | package Protocol::Sys::Virt::UNIXSocket v12.9.0; | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use parent qw(Exporter); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | 1 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | ▶ | use Log::Any qw($log); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 1 | our @EXPORT = qw( socket_path ); | |||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | 14 | ▶ | sub socket_path { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
socket_path: called CC=8 SCAR=20.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 14 | my %args = @_; | |||||||||||||||||||||||||||||||||||||||||
| 27 | 14 | ▶ | my $path = $args{prefix} // ''; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$args{"prefix"} // ""
MC/DC100%1/1
$args{"prefix"} // ""
$args{"prefix"}
Truth table100%2/2
A
A= $args{"prefix"}
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | 14 | $path .= '/run/libvirt'; | |||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 14 | my $driver; | |||||||||||||||||||||||||||||||||||||||||
| 31 | 14 | ▶ | my $mode = $args{mode} // 'legacy'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$args{"mode"} // "legacy"
MC/DC100%1/1
$args{"mode"} // "legacy"
$args{"mode"}
Truth table100%2/2
A
A= $args{"mode"}
| |||||||||||||||||||||||||||||||||||||||||||
| 32 | 14 | ▶ | if ($mode eq 'direct' and ($args{hypervisor} // $args{driver})) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%4/6
$mode eq "direct" and $args{"hypervisor"} // $args{"driver"}
$args{"hypervisor"} // $args{"driver"}
MC/DC33%1/3
$mode eq "direct" and $args{"hypervisor"} // $args{"driver"}
$mode eq "direct"
$args{"hypervisor"}
$args{"driver"}
Truth table75%3/4
A and B // C
A= $mode eq "direct"B= $args{"hypervisor"}C= $args{"driver"}
| |||||||||||||||||||||||||||||||||||||||||||
| 33 | 6 | ▶ | $path .= '/virt' . ($args{hypervisor} // $args{driver}) . 'd-sock'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$args{"hypervisor"} // $args{"driver"}
MC/DC0%0/2
$args{"hypervisor"} // $args{"driver"}
$args{"hypervisor"}
$args{"driver"}
Truth table66%2/3
A // B
A= $args{"hypervisor"}B= $args{"driver"}
| |||||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||
| 35 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 36 | 8 | $path .= '/libvirt-sock'; | |||||||||||||||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||||||||||||||||
| 38 | 14 | ▶ | if ($args{readonly}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 6 | $path .= '-ro'; | |||||||||||||||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | 14 | return $path; | |||||||||||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | __END__ | ||||||||||||||||||||||||||||||||||||||||||