Google
  Web www.spinics.net

[PATCH 2/4] Try to display title when printing information with '--info'

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


Signed-off-by: Cleber Rosa <crosa@xxxxxxxxxx>
---
 grubby.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/grubby.c b/grubby.c
index 73a5263..bd10205 100644
--- a/grubby.c
+++ b/grubby.c
@@ -1901,6 +1901,17 @@ void displayEntry(struct singleEntry * entry, const char * prefix, int index) {
 	    printf("%s%s", line->elements[i].item, line->elements[i].indent);
 	printf("\n");
     }
+
+    line = getLineByType(LT_TITLE, entry->lines);
+    if (line) {
+        printf("title=%s\n", line->elements[1].item);
+    } else {
+        char * title;
+	line = getLineByType(LT_MENUENTRY, entry->lines);
+	title = grub2ExtractTitle(line);
+        if (title)
+            printf("title=%s\n", title);
+    }
 }
 
 int parseSysconfigGrub(int * lbaPtr, char ** bootPtr) {
-- 
1.7.6.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Home]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Red Hat 9 Bible]     [Fedora Bible]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net