diff options
author | Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> | 2019-05-09 17:36:46 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-05-10 14:54:27 -0400 |
commit | 00603cd687db3b7cc5e62a186dca66e4a5fa03dc (patch) | |
tree | 819697b035f5ae9131763ff32847021583e874cc | |
parent | cc2eb3a2f82c8c07a9d0e24d5cd9f4416d001f98 (diff) |
ktest: remove get_grub2_index
Remove get_grub2_index() because it isn't used anywhere.
Link: http://lkml.kernel.org/r/20190509213647.6276-6-msys.mizuma@gmail.com
Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index abd6f37b0561..4711f57e809a 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -1916,42 +1916,6 @@ sub _get_grub_index { | |||
1916 | $last_machine = $machine; | 1916 | $last_machine = $machine; |
1917 | } | 1917 | } |
1918 | 1918 | ||
1919 | sub get_grub2_index { | ||
1920 | |||
1921 | return if (defined($grub_number) && defined($last_grub_menu) && | ||
1922 | $last_grub_menu eq $grub_menu && defined($last_machine) && | ||
1923 | $last_machine eq $machine); | ||
1924 | |||
1925 | doprint "Find grub2 menu ... "; | ||
1926 | $grub_number = -1; | ||
1927 | |||
1928 | my $ssh_grub = $ssh_exec; | ||
1929 | $ssh_grub =~ s,\$SSH_COMMAND,cat $grub_file,g; | ||
1930 | |||
1931 | open(IN, "$ssh_grub |") | ||
1932 | or dodie "unable to get $grub_file"; | ||
1933 | |||
1934 | my $found = 0; | ||
1935 | my $grub_menu_qt = quotemeta($grub_menu); | ||
1936 | |||
1937 | while (<IN>) { | ||
1938 | if (/^menuentry.*$grub_menu_qt/) { | ||
1939 | $grub_number++; | ||
1940 | $found = 1; | ||
1941 | last; | ||
1942 | } elsif (/^menuentry\s|^submenu\s/) { | ||
1943 | $grub_number++; | ||
1944 | } | ||
1945 | } | ||
1946 | close(IN); | ||
1947 | |||
1948 | dodie "Could not find '$grub_menu' in $grub_file on $machine" | ||
1949 | if (!$found); | ||
1950 | doprint "$grub_number\n"; | ||
1951 | $last_grub_menu = $grub_menu; | ||
1952 | $last_machine = $machine; | ||
1953 | } | ||
1954 | |||
1955 | sub get_grub_index { | 1919 | sub get_grub_index { |
1956 | 1920 | ||
1957 | my $command; | 1921 | my $command; |