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

[Libguestfs] [PATCH supermin 8/9] kernel: Simple renaming to make find_kernel_from_* functions consistent.



No functional change, just renaming variables.
---
 src/format_ext2_kernel.ml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml
index e329adb..44ba035 100644
--- a/src/format_ext2_kernel.ml
+++ b/src/format_ext2_kernel.ml
@@ -94,9 +94,11 @@ and find_kernel_from_lib_modules debug =
     let files = Array.to_list files in
     let kernels =
       List.map (
-        fun f ->
-          let modpath = Filename.dirname f in
-          f, Filename.basename f, Filename.basename modpath, modpath
+        fun kernel_file ->
+          let kernel_name = Filename.basename kernel_file in
+          let modpath = Filename.dirname kernel_file in
+          let kernel_version = Filename.basename modpath in
+          kernel_file, kernel_name, kernel_version, modpath
       ) files in
     List.sort (
       fun (_, _, a, _) (_, _, b, _) -> compare_version b a
-- 
2.13.1


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