]> git.ozlabs.org Git - petitboot/blobdiff - discover/parser.c
discover: Print IPMI bootdev response for debug
[petitboot] / discover / parser.c
index 74b2559c8ab9776d138bddc7a8ea51ef9625351d..fbf31b2806060009a4d136906fc5b03be64917dc 100644 (file)
@@ -5,6 +5,7 @@
 #include <sys/stat.h>
 
 #include "types/types.h"
+#include <file/file.h>
 #include <log/log.h>
 #include <talloc/talloc.h>
 
@@ -12,7 +13,6 @@
 #include "parser.h"
 #include "parser-utils.h"
 #include "paths.h"
-#include "file.h"
 
 struct p_item {
        struct list_item list;
@@ -25,7 +25,7 @@ static char *local_path(struct discover_context *ctx,
                struct discover_device *dev,
                const char *filename)
 {
-       return join_paths(ctx, dev->mount_path, filename);
+       return join_paths(ctx, dev->root_path, filename);
 }
 
 int parser_request_file(struct discover_context *ctx,
@@ -62,6 +62,7 @@ int parser_check_dir(struct discover_context *ctx,
        path = local_path(ctx, dev, dirname);
 
        rc = stat(path, &statbuf);
+       talloc_free(path);
        if (!rc)
                return -1;