|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 14/82] target setup refactoring: Merge target_kernkind_*
From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Combine these two functions. Rename them to a name which doesn't
mention "kernkind".
No functional change.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
Osstest/Debian.pm | 3 +--
Osstest/TestSupport.pm | 11 ++++-------
ts-debian-fixup | 3 +--
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index b140ede2..85fd16da 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -68,8 +68,7 @@ sub debian_boot_setup ($$$$$;$) {
# $xenhopt==undef => is actually a guest, do not set up a hypervisor
my ($ho, $want_kernver, $want_xsm, $xenhopt, $distpath, $hooks) = @_;
- target_kernkind_check($ho);
- target_kernkind_console_inittab($ho,$ho,"/");
+ target_setup_rootdev_console_inittab($ho,$ho,"/");
my $kopt;
my $console= target_var($ho,'console');
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index faac106f..fd7b238b 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -105,7 +105,7 @@ BEGIN {
host_get_free_memory
target_ping_check_down target_ping_check_up
- target_kernkind_check target_kernkind_console_inittab
+ target_setup_rootdev_console_inittab
target_var target_var_prefix
selectguest prepareguest more_prepareguest_hvm
guest_template
@@ -2562,8 +2562,9 @@ sub target_var ($$) {
return undef;
}
-sub target_kernkind_check ($) {
- my ($gho) = @_;
+sub target_setup_rootdev_console_inittab ($$$) {
+ my ($ho, $gho, $root) = @_;
+
my $pfx= target_var_prefix($gho);
my $kernkind= $r{$pfx."kernkind"} // 'pvops';
my $isguest= exists $gho->{Guest};
@@ -2573,10 +2574,6 @@ sub target_kernkind_check ($) {
} elsif ($kernkind !~ m/2618/) {
store_runvar($pfx."console", 'xvc0') if $isguest;
}
-}
-
-sub target_kernkind_console_inittab ($$$) {
- my ($ho, $gho, $root) = @_;
my $inittabpath= "$root/etc/inittab";
my $console= target_var($gho,'console');
diff --git a/ts-debian-fixup b/ts-debian-fixup
index 2184212b..a878fe50 100755
--- a/ts-debian-fixup
+++ b/ts-debian-fixup
@@ -209,8 +209,7 @@ sub writecfg () {
savecfg();
ether();
access();
-target_kernkind_check($gho);
-$console = target_kernkind_console_inittab($ho,$gho,"$mountpoint");
+$console = target_setup_rootdev_console_inittab($ho,$gho,"$mountpoint");
debian_overlays($ho, \&overlay);
target_cmd_root($ho, <<END.debian_overlays_fixup_cmd($ho, $mountpoint));
--
2.20.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |