mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 13:17:39 +02:00
Support loading CPIO from a chunk of bytes
This commit is contained in:
@ -30,8 +30,9 @@ struct cpio_entry : public cpio_entry_base {
|
||||
explicit cpio_entry(const char *name, uint32_t mode) : filename(name) {
|
||||
this->mode = mode;
|
||||
}
|
||||
cpio_entry(int fd, cpio_newc_header &header);
|
||||
~cpio_entry() override;
|
||||
explicit cpio_entry(cpio_newc_header *h) : cpio_entry_base(h) {}
|
||||
|
||||
~cpio_entry() override { free(data); };
|
||||
};
|
||||
|
||||
typedef std::map<std::string_view, std::unique_ptr<cpio_entry_base>> entry_map;
|
||||
@ -61,6 +62,7 @@ public:
|
||||
|
||||
protected:
|
||||
void mv(entry_map::iterator &it, const char *to);
|
||||
void load_cpio(char *buf, size_t sz);
|
||||
};
|
||||
|
||||
class cpio_mmap : public cpio {
|
||||
|
Reference in New Issue
Block a user