[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 10/12] target setup refactoring: Merge target_kernkind_*


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Tue, 25 Aug 2020 12:40:39 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 25 Aug 2020 11:40:59 +0000
  • Ironport-sdr: pomW1TMtNuGay6tK8pD0paEZ2SyWz0knx1vh+t8K/n897v+/qTp0hyuHXcbJAtxJXOEFlD97Ph US5AB6IBZF5mI+u8ILVpebmEWdIetEmDurt4qHcYaCMZGZZBGShuxUzQisM3CPNc8AhyUrTE8h 2AtS8TpM7gEy7Q+sBRsI8y5wjdn8EBe991hwbuI2AdriPkbAz1IYC58WiIvCxlLDPGssEkjss2 gN14EN5KIO9N1NiMgTMIj2wUtQGRhGMywUjTZ11nIG3eN2dG1ELpV4DulSdpgBjz71u1/xNtRK Om8=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.