nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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