X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Finode.h;h=a345084464d11694eb1ec8e6609abf2bef33f901;hp=28285b2baca4af5da2d7cae5f691c6127732996a;hb=0b52336c9e67aa31c04af59867c2541384141a3d;hpb=3de1ec66f778edda19865482d685bc6f4e17faf7 diff --git a/include/wimlib/inode.h b/include/wimlib/inode.h index 28285b2b..a3450844 100644 --- a/include/wimlib/inode.h +++ b/include/wimlib/inode.h @@ -281,10 +281,7 @@ struct wim_inode { #define FILE_ATTRIBUTE_VIRTUAL 0x00010000 extern struct wim_inode * -new_inode(void) _malloc_attribute; - -extern struct wim_inode * -new_timeless_inode(void) _malloc_attribute; +new_inode(struct wim_dentry *dentry, bool set_timestamps); /* Iterate through each alias of the specified inode. */ #define inode_for_each_dentry(dentry, inode) \ @@ -349,11 +346,29 @@ inode_get_stream(const struct wim_inode *inode, int stream_type, extern struct wim_inode_stream * inode_get_unnamed_stream(const struct wim_inode *inode, int stream_type); +static inline struct wim_inode_stream * +inode_get_unnamed_data_stream(const struct wim_inode *inode) +{ + return inode_get_unnamed_stream(inode, STREAM_TYPE_DATA); +} + extern struct wim_inode_stream * inode_add_stream(struct wim_inode *inode, int stream_type, const utf16lechar *stream_name, struct blob_descriptor *blob); -extern struct wim_inode_stream * +extern void +inode_replace_stream_blob(struct wim_inode *inode, + struct wim_inode_stream *strm, + struct blob_descriptor *new_blob, + struct blob_table *blob_table); + +extern bool +inode_replace_stream_data(struct wim_inode *inode, + struct wim_inode_stream *strm, + const void *data, size_t size, + struct blob_table *blob_table); + +extern bool inode_add_stream_with_data(struct wim_inode *inode, int stream_type, const utf16lechar *stream_name, const void *data, size_t size, @@ -370,13 +385,6 @@ stream_blob_resolved(const struct wim_inode_stream *strm) return strm->_stream_blob; } -static inline void -stream_set_blob(struct wim_inode_stream *strm, struct blob_descriptor *blob) -{ - strm->_stream_blob = blob; - strm->stream_resolved = 1; -} - static inline bool stream_is_named(const struct wim_inode_stream *strm) {