summaryrefslogtreecommitdiff
path: root/rtemstoolkit/rld-files.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-04-14 14:15:07 +1000
committerChris Johns <chrisj@rtems.org>2018-04-14 14:15:07 +1000
commit82c8788b111a4392a56414f8f421ba26ded5d0fd (patch)
tree757c4d3a9f27b56c13687862d66497f51dba5d18 /rtemstoolkit/rld-files.h
parentb7c4753de0c17201be0ca047e2a7e320616132cb (diff)
rtemstoolkit/rtl-file: Remove a file on close if requested
Close #3395
Diffstat (limited to 'rtemstoolkit/rld-files.h')
-rw-r--r--rtemstoolkit/rld-files.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/rtemstoolkit/rld-files.h b/rtemstoolkit/rld-files.h
index 09e9aaf..f19b732 100644
--- a/rtemstoolkit/rld-files.h
+++ b/rtemstoolkit/rld-files.h
@@ -388,6 +388,14 @@ namespace rld
return writable;
}
+ /**
+ * Remove a writable file on close. This flag can be set when an error
+ * happens while writing a file.
+ */
+ void remove_on_close () {
+ remove = true;
+ }
+
private:
file name_; //< The name of the file.
@@ -396,6 +404,7 @@ namespace rld
elf::file elf_; //< The libelf reference.
int symbol_refs; //< The number of symbols references made.
bool writable; //< The image is writable.
+ bool remove; //< Remove the image on close if writable.
};
/**