]> git.ozlabs.org Git - petitboot/commitdiff
discover/status: Add parse status for GRUB2, yaboot & kboot parsers
authorJeremy Kerr <jk@ozlabs.org>
Mon, 12 Dec 2016 13:20:22 +0000 (21:20 +0800)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 20 Dec 2016 05:40:21 +0000 (16:40 +1100)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/grub2/grub2.c
discover/kboot-parser.c
discover/yaboot-parser.c

index 5b3009a465f7d43ac8f351c00aac7b1075fbd24b..34746164728f4e3edc166a7c39f1039e94227f15 100644 (file)
@@ -1,6 +1,7 @@
 
 #include <assert.h>
 #include <string.h>
 
 #include <assert.h>
 #include <string.h>
+#include <i18n/i18n.h>
 
 #include <talloc/talloc.h>
 #include <url/url.h>
 
 #include <talloc/talloc.h>
 #include <url/url.h>
@@ -103,6 +104,9 @@ static int grub2_parse(struct discover_context *dc)
 
                parser = grub2_parser_create(dc);
                grub2_parser_parse(parser, *filename, buf, len);
 
                parser = grub2_parser_create(dc);
                grub2_parser_parse(parser, *filename, buf, len);
+               device_handler_status_dev_info(dc->handler, dc->device,
+                               _("Parsed GRUB configuration from %s"),
+                               *filename);
                talloc_free(buf);
                talloc_free(parser);
                break;
                talloc_free(buf);
                talloc_free(parser);
                break;
index f7f75e07ceae60212f3ccef5cea34d7ed3ef93aa..bf9c5eb2fe98f5f59056cad85f47e018cb31a674 100644 (file)
@@ -5,6 +5,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
+#include <i18n/i18n.h>
 
 #include "log/log.h"
 #include "talloc/talloc.h"
 
 #include "log/log.h"
 #include "talloc/talloc.h"
@@ -188,6 +189,9 @@ static int kboot_parse(struct discover_context *dc)
                        continue;
 
                conf_parse_buf(conf, buf, len);
                        continue;
 
                conf_parse_buf(conf, buf, len);
+               device_handler_status_dev_info(dc->handler, dc->device,
+                               _("Parsed kboot configuration from %s"),
+                               *filename);
                talloc_free(buf);
        }
 
                talloc_free(buf);
        }
 
index b62f39db7a9466a3d2da2fdd8698568d6dabedff..42db95bcfbbb1ae758b4704303baa3b3992dc5d8 100644 (file)
@@ -6,6 +6,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+#include <i18n/i18n.h>
 
 #include "log/log.h"
 #include "talloc/talloc.h"
 
 #include "log/log.h"
 #include "talloc/talloc.h"
@@ -380,6 +381,9 @@ static int yaboot_parse(struct discover_context *dc)
                        continue;
 
                conf_parse_buf(conf, buf, len);
                        continue;
 
                conf_parse_buf(conf, buf, len);
+               device_handler_status_dev_info(dc->handler, dc->device,
+                               _("Parsed yaboot configuration from %s"),
+                               *filename);
                talloc_free(buf);
        }
 
                talloc_free(buf);
        }