nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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