summaryrefslogtreecommitdiffstats
path: root/external/common
diff options
context:
space:
mode:
Diffstat (limited to 'external/common')
-rw-r--r--external/common/arch_flash.h3
-rw-r--r--external/common/arch_flash_arm.c4
-rw-r--r--external/common/arch_flash_powerpc.c8
-rw-r--r--external/common/arch_flash_x86.c4
4 files changed, 10 insertions, 9 deletions
diff --git a/external/common/arch_flash.h b/external/common/arch_flash.h
index 60c4de8e..918ffa92 100644
--- a/external/common/arch_flash.h
+++ b/external/common/arch_flash.h
@@ -20,7 +20,8 @@
#include <getopt.h>
#include <libflash/blocklevel.h>
-int arch_flash_init(struct blocklevel_device **bl, const char *file);
+int arch_flash_init(struct blocklevel_device **bl, const char *file,
+ bool keep_alive);
void arch_flash_close(struct blocklevel_device *bl, const char *file);
diff --git a/external/common/arch_flash_arm.c b/external/common/arch_flash_arm.c
index 13d29465..f65bddc2 100644
--- a/external/common/arch_flash_arm.c
+++ b/external/common/arch_flash_arm.c
@@ -263,7 +263,7 @@ int arch_flash_set_wrprotect(struct blocklevel_device *bl, int set)
return set_wrprotect(set);
}
-int arch_flash_init(struct blocklevel_device **r_bl, const char *file)
+int arch_flash_init(struct blocklevel_device **r_bl, const char *file, bool keep_alive)
{
struct blocklevel_device *new_bl;
@@ -272,7 +272,7 @@ int arch_flash_init(struct blocklevel_device **r_bl, const char *file)
return -1;
if (file) {
- file_init_path(file, NULL, &new_bl);
+ file_init_path(file, NULL, keep_alive, &new_bl);
} else {
new_bl = flash_setup(arch_data.bmc);
}
diff --git a/external/common/arch_flash_powerpc.c b/external/common/arch_flash_powerpc.c
index 93eaceea..19dfec8c 100644
--- a/external/common/arch_flash_powerpc.c
+++ b/external/common/arch_flash_powerpc.c
@@ -188,7 +188,7 @@ static int get_dev_mtd(const char *fdt_flash_path, char **mtd_path)
return done ? rc : -1;
}
-static struct blocklevel_device *arch_init_blocklevel(const char *file)
+static struct blocklevel_device *arch_init_blocklevel(const char *file, bool keep_alive)
{
int rc;
struct blocklevel_device *new_bl = NULL;
@@ -200,7 +200,7 @@ static struct blocklevel_device *arch_init_blocklevel(const char *file)
return NULL;
}
- file_init_path(file ? file : real_file, NULL, &new_bl);
+ file_init_path(file ? file : real_file, NULL, keep_alive, &new_bl);
free(real_file);
return new_bl;
}
@@ -211,11 +211,11 @@ int arch_flash_set_wrprotect(struct blocklevel_device *bl, int set)
return 0;
}
-int arch_flash_init(struct blocklevel_device **r_bl, const char *file)
+int arch_flash_init(struct blocklevel_device **r_bl, const char *file, bool keep_alive)
{
struct blocklevel_device *new_bl;
- new_bl = arch_init_blocklevel(file);
+ new_bl = arch_init_blocklevel(file, keep_alive);
if (!new_bl)
return -1;
diff --git a/external/common/arch_flash_x86.c b/external/common/arch_flash_x86.c
index 29c0229e..3be05dfc 100644
--- a/external/common/arch_flash_x86.c
+++ b/external/common/arch_flash_x86.c
@@ -28,7 +28,7 @@
#include "arch_flash.h"
-int arch_flash_init(struct blocklevel_device **r_bl, const char *file)
+int arch_flash_init(struct blocklevel_device **r_bl, const char *file, bool keep_alive)
{
struct blocklevel_device *new_bl;
@@ -38,7 +38,7 @@ int arch_flash_init(struct blocklevel_device **r_bl, const char *file)
return -1;
}
- file_init_path(file, NULL, &new_bl);
+ file_init_path(file, NULL, keep_alive, &new_bl);
if (!new_bl)
return -1;
OpenPOWER on IntegriCloud