Debug aarch64
OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=100
This commit is contained in:
parent
84bc57fe47
commit
cc6a4ab3a8
@ -55,7 +55,7 @@ Index: supermin-5.3.5/src/format_ext2_kernel.ml
|
||||
try
|
||||
let kernel_env = getenv "SUPERMIN_KERNEL" in
|
||||
if debug >= 1 then
|
||||
@@ -119,6 +132,10 @@ and find_kernel_from_lib_modules debug h
|
||||
@@ -119,8 +132,14 @@ and find_kernel_from_lib_modules debug h
|
||||
let files = glob "/lib/modules/*/vmlinuz" [GLOB_NOSORT; GLOB_NOESCAPE] in
|
||||
let files = Array.to_list files in
|
||||
|
||||
@ -65,17 +65,21 @@ Index: supermin-5.3.5/src/format_ext2_kernel.ml
|
||||
+ );
|
||||
let files = ignore_unbootable_kernels host_cpu files in
|
||||
|
||||
+ let () = List.iter (printf " CEA:supermin:find_kernel_lib_modules: files = %s\n ") files in
|
||||
+
|
||||
let kernels =
|
||||
@@ -151,15 +168,24 @@ and find_kernel_from_boot debug host_cpu
|
||||
let kernels =
|
||||
filter_map (
|
||||
@@ -151,15 +170,24 @@ and find_kernel_from_boot debug host_cpu
|
||||
let files = files_matching_globs patterns all_files in
|
||||
let files = ignore_unbootable_kernels host_cpu files in
|
||||
|
||||
+ if debug >= 1 then
|
||||
+ printf "CEA:supermin:find_kernel_from_boot: host_cpu = %s\n%!" host_cpu;
|
||||
+
|
||||
+ let () = List.iter (printf "CEA:supermin:find_kernel_from_boot: all_files = %s ") all_files in
|
||||
+ let () = List.iter (printf " CEA:supermin:find_kernel_from_boot: all_files = %s\n ") all_files in
|
||||
+
|
||||
+ let () = List.iter (printf "CEA:supermin:find_kernel_from_boot: files = %s ") files in
|
||||
+ let () = List.iter (printf " CEA:supermin:find_kernel_from_boot: files = %s\n ") files in
|
||||
+
|
||||
let files =
|
||||
if files <> [] then files
|
||||
@ -92,24 +96,27 @@ Index: supermin-5.3.5/src/format_ext2_kernel.ml
|
||||
let files = List.sort (fun a b -> compare_version b a) files in
|
||||
let kernels =
|
||||
filter_map (
|
||||
@@ -243,8 +269,11 @@ and has_modpath modpath =
|
||||
@@ -243,8 +271,11 @@ and has_modpath modpath =
|
||||
* filename.
|
||||
*)
|
||||
and get_kernel_version debug kernel_file =
|
||||
- if debug >= 1 then
|
||||
- printf "supermin: kernel: kernel version of %s%!" kernel_file;
|
||||
+ if debug >= 1 then (
|
||||
printf "supermin: kernel: kernel version of %s%!" kernel_file;
|
||||
+ printf "supermin: kernel: kernel version of %s\n%!" kernel_file;
|
||||
+ printf "CEA:supermin:get_kernel_version: kernel_file = %s\n%!" kernel_file;
|
||||
+ printf "CEA:supermin:get_kernel_version: no host_cpu passed here\n%!";
|
||||
+ );
|
||||
match get_kernel_version_from_file_content kernel_file with
|
||||
| Some version ->
|
||||
if debug >= 1 then printf " = %s (from content)\n%!" version;
|
||||
@@ -262,9 +291,14 @@ and get_kernel_version debug kernel_file
|
||||
@@ -262,9 +293,16 @@ and get_kernel_version debug kernel_file
|
||||
else (
|
||||
basename
|
||||
) in
|
||||
- if string_prefix "vmlinuz-" basename || string_prefix "vmlinux-" basename
|
||||
+ if debug >= 1 then
|
||||
+ printf "CEA:supermin:get_kernel_version: basename = %s\n%!" basename;
|
||||
+ if string_prefix "vmlinuz-" basename || string_prefix "vmlinux-" basename || string_prefix "Image-" basename
|
||||
then (
|
||||
- let version = String.sub basename 8 (String.length basename - 8) in
|
||||
@ -122,3 +129,11 @@ Index: supermin-5.3.5/src/format_ext2_kernel.ml
|
||||
(* Does the version look reasonable? *)
|
||||
let modpath = "/lib/modules" // version in
|
||||
if has_modpath modpath then (
|
||||
@@ -296,6 +334,7 @@ and get_kernel_version debug kernel_file
|
||||
* Bugs: probably limited to x86 kernels.
|
||||
*)
|
||||
and get_kernel_version_from_file_content file =
|
||||
+ printf "CEA:supermin:get_kernel_version_from_file_content: file = %s\n%!" file;
|
||||
try
|
||||
let chan = open_in file in
|
||||
let buf = read_string chan 514 4 in
|
||||
|
Loading…
Reference in New Issue
Block a user