]> wimlib.net Git - wimlib/blobdiff - src/wimlib_internal.h
Fix typo
[wimlib] / src / wimlib_internal.h
index 87829957e3fbfdc7b8212a9b1cdd9c0cab313d6b..840348d4ac9020f6004ee1e56433e1fb932b7610 100644 (file)
@@ -31,6 +31,8 @@
 #include "util.h"
 #include "list.h"
 
+#include "wimlib.h"
+
 #ifdef WITH_FUSE
 #include <pthread.h>
 #endif
@@ -39,8 +41,6 @@ struct stat;
 struct dentry;
 struct inode;
 
-#include "wimlib.h"
-
 #define WIM_MAGIC_LEN  8
 #define WIM_GID_LEN    16
 #define WIM_UNUSED_LEN 60
@@ -250,7 +250,6 @@ struct image_metadata {
         * the case, the memory for the filesystem is not freed when switching
         * to a different WIM image. */
        u8 modified : 1;
-
        u8 has_been_mounted_rw : 1;
 };
 
@@ -259,7 +258,7 @@ struct image_metadata {
 #define WIMLIB_RESOURCE_FLAG_RECOMPRESS                0x4
 
 /* The opaque structure exposed to the wimlib API. */
-typedef struct WIMStruct {
+struct WIMStruct {
 
        /* A pointer to the file indicated by @filename, opened for reading. */
        FILE *fp;
@@ -310,7 +309,7 @@ typedef struct WIMStruct {
 
        /* %true iff any images have been deleted from this WIM. */
        bool deletion_occurred;
-} WIMStruct;
+};
 
 
 /* Inline utility functions for WIMStructs. */
@@ -454,19 +453,21 @@ struct apply_args {
        struct _ntfs_volume *vol;
 #endif
        struct list_head empty_files;
+       wimlib_progress_func_t progress_func;
 };
 
-extern int wim_apply_dentry_ntfs(struct dentry *dentry, void *arg);
-extern int wim_apply_dentry_timestamps(struct dentry *dentry, void *arg);
+extern int apply_dentry_ntfs(struct dentry *dentry, void *arg);
+extern int apply_dentry_timestamps_ntfs(struct dentry *dentry, void *arg);
 
 /* ntfs-capture.c */
-int build_dentry_tree_ntfs(struct dentry **root_p,
-                          const char *device,
-                          struct lookup_table *lookup_table,
-                          struct wim_security_data *sd,
-                          const struct capture_config *config,
-                          int flags,
-                          void *extra_arg);
+extern int build_dentry_tree_ntfs(struct dentry **root_p,
+                                 const char *device,
+                                 struct lookup_table *lookup_table,
+                                 struct wim_security_data *sd,
+                                 const struct capture_config *config,
+                                 int add_image_flags,
+                                 wimlib_progress_func_t progress_func,
+                                 void *extra_arg);
 
 /* resource.c */
 extern const u8 *get_resource_entry(const u8 *p, struct resource_entry *entry);
@@ -524,9 +525,6 @@ extern WIMStruct *new_wim_struct();
 extern int select_wim_image(WIMStruct *w, int image);
 extern int wim_hdr_flags_compression_type(int wim_hdr_flags);
 extern int for_image(WIMStruct *w, int image, int (*visitor)(WIMStruct *));
-extern int open_wim_readable(WIMStruct *w, const char *path);
-extern int open_wim_writable(WIMStruct *w, const char *path,
-                            bool trunc, bool readable);
 
 /* Internal use only */
 #define WIMLIB_WRITE_FLAG_NO_LOOKUP_TABLE      0x80000000
@@ -542,9 +540,19 @@ extern int open_wim_writable(WIMStruct *w, const char *path,
 
 /* write.c */
 extern int begin_write(WIMStruct *w, const char *path, int write_flags);
+extern void close_wim_writable(WIMStruct *w);
 
 extern int finish_write(WIMStruct *w, int image, int write_flags,
                        wimlib_progress_func_t progress_func);
 
+#if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK)
+extern int lock_wim(FILE *fp, const char *path);
+#else
+static inline int lock_wim(FILE *fp, const char *path)
+{
+       return 0;
+}
+#endif
+
 #endif /* _WIMLIB_INTERNAL_H */