Blame SOURCES/0171-Added-debug-statements-to-grub_disk_open-and-grub_di.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
5593c8
Date: Sat, 23 Nov 2019 15:22:16 +0100
5593c8
Subject: [PATCH] Added debug statements to grub_disk_open() and
5593c8
 grub_disk_close() on success
5593c8
MIME-Version: 1.0
5593c8
Content-Type: text/plain; charset=UTF-8
5593c8
Content-Transfer-Encoding: 8bit
5593c8
5593c8
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
5593c8
---
5593c8
 grub-core/kern/disk.c | 6 +++++-
5593c8
 1 file changed, 5 insertions(+), 1 deletion(-)
5593c8
5593c8
diff --git a/grub-core/kern/disk.c b/grub-core/kern/disk.c
1c6ba0
index e1b0e073e0..05a28ab142 100644
5593c8
--- a/grub-core/kern/disk.c
5593c8
+++ b/grub-core/kern/disk.c
5593c8
@@ -285,6 +285,8 @@ grub_disk_open (const char *name)
5593c8
       return 0;
5593c8
     }
5593c8
 
5593c8
+  grub_dprintf ("disk", "Opening `%s' succeeded.\n", name);
5593c8
+
5593c8
   return disk;
5593c8
 }
5593c8
 
5593c8
@@ -292,7 +294,7 @@ void
5593c8
 grub_disk_close (grub_disk_t disk)
5593c8
 {
5593c8
   grub_partition_t part;
5593c8
-  grub_dprintf ("disk", "Closing `%s'.\n", disk->name);
5593c8
+  grub_dprintf ("disk", "Closing `%s'...\n", disk->name);
5593c8
 
5593c8
   if (disk->dev && disk->dev->disk_close)
5593c8
     (disk->dev->disk_close) (disk);
5593c8
@@ -306,8 +308,10 @@ grub_disk_close (grub_disk_t disk)
5593c8
       grub_free (disk->partition);
5593c8
       disk->partition = part;
5593c8
     }
5593c8
+  grub_dprintf ("disk", "Closing `%s' succeeded.\n", disk->name);
5593c8
   grub_free ((void *) disk->name);
5593c8
   grub_free (disk);
5593c8
+
5593c8
 }
5593c8
 
5593c8
 /* Small read (less than cache size and not pass across cache unit boundaries).