FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 01-07-2012, 01:37 PM
Cleber Rosa
 
Default Try to display title when printing information with '--info'

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
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("
");
}
+
+ line = getLineByType(LT_TITLE, entry->lines);
+ if (line) {
+ printf("title=%s
", line->elements[1].item);
+ } else {
+ char * title;
+ line = getLineByType(LT_MENUENTRY, entry->lines);
+ title = grub2ExtractTitle(line);
+ if (title)
+ printf("title=%s
", title);
+ }
}

int parseSysconfigGrub(int * lbaPtr, char ** bootPtr) {
--
1.7.6.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-09-2012, 08:25 PM
Peter Jones
 
Default Try to display title when printing information with '--info'

On 01/07/2012 09:37 AM, Cleber Rosa wrote:

Signed-off-by: Cleber Rosa<crosa@redhat.com>
---
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("
");
}
+
+ line = getLineByType(LT_TITLE, entry->lines);
+ if (line) {
+ printf("title=%s
", line->elements[1].item);
+ } else {
+ char * title;
+ line = getLineByType(LT_MENUENTRY, entry->lines);
+ title = grub2ExtractTitle(line);
+ if (title)
+ printf("title=%s
", title);
+ }


Please fix the whitespace here and resend.

--
Peter

When in doubt, debug-on-entry the function you least suspect has
anything to do with something.

01234567890123456789012345678901234567890123456789 012345678901234567890123456789

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

Thread Tools




All times are GMT. The time now is 09:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org