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

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