summaryrefslogtreecommitdiff
path: root/rld-files.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-11-21 10:40:01 +1100
committerChris Johns <chrisj@rtems.org>2012-11-21 10:40:01 +1100
commit4cbee029b186d321bbf3dc468ac606e3788469a5 (patch)
tree8ddfb0f3b71022720526a0f4a073c6c1287c3e25 /rld-files.h
parent256c1455227fd1421e7c71b2902df6a07cd290f2 (diff)
Fix archive GNU extension and make image read/write follow POSIX.
Fix the finding of a file name in the GNU extension for long names in GNU archives so the correct location is referenced. Made the image read and write routines keep reading if not all the requested data is read or written due to possible signals.
Diffstat (limited to 'rld-files.h')
-rw-r--r--rld-files.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/rld-files.h b/rld-files.h
index fd593bf..b057b2e 100644
--- a/rld-files.h
+++ b/rld-files.h
@@ -240,7 +240,7 @@ namespace rld
const std::string& oname () const;
/**
- * The object's offset in the archive.
+ * The object's offset in the archive or on disk.
*/
off_t offset () const;
@@ -253,7 +253,7 @@ namespace rld
std::string aname_; //< The archive name.
std::string oname_; //< The object name.
off_t offset_; //< The object's offset in the archive.
- size_t size_; //< The object's size in teh archive.
+ size_t size_; //< The object's size in the archive or on disk.
};
/**
@@ -308,7 +308,7 @@ namespace rld
/**
* Read a block from the file.
*/
- virtual ssize_t read (uint8_t* buffer, size_t size);
+ virtual ssize_t read (void* buffer, size_t size);
/**
* Write a block from the file.
@@ -780,6 +780,15 @@ namespace rld
};
/**
+ * Copy the in file to the out file.
+ *
+ * @param in The input file.
+ * @param out The output file.
+ * @param size The amount to copy. If 0 the whole on in is copied.
+ */
+ void copy_file (image& in, image& out, size_t size = 0);
+
+ /**
* Find the libraries given the list of libraries as bare name which
* have 'lib' and '.a' added.
*/