]> wimlib.net Git - wimlib/blobdiff - include/wimlib/wof.h
Use more comprehensive public domain dedications
[wimlib] / include / wimlib / wof.h
index 71d97d80674a716c1b4694ea31a11ace199122f5..d0fcf03a3ca4797727846fa183a817bcaedcebed 100644 (file)
@@ -1,13 +1,26 @@
 /*
  * wof.h
  *
- * Definitions for the Windows Overlay File System Filter (WOF) ioctls, as well
+ * Definitions for the Windows Overlay Filesystem filter (WOF) ioctls, as well
  * some definitions for associated undocumented data structures.  See
  * http://msdn.microsoft.com/en-us/library/windows/hardware/ff540367(v=vs.85).aspx
  * for more information about the documented ioctls.
  *
- * The author dedicates this file to the public domain.
- * You can do whatever you want with this file.
+ * The following copying information applies to this specific source code file:
+ *
+ * Written in 2014-2016 by Eric Biggers <ebiggers3@gmail.com>
+ *
+ * To the extent possible under law, the author(s) have dedicated all copyright
+ * and related and neighboring rights to this software to the public domain
+ * worldwide via the Creative Commons Zero 1.0 Universal Public Domain
+ * Dedication (the "CC0").
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the CC0 for more details.
+ *
+ * You should have received a copy of the CC0 along with this software; if not
+ * see <http://creativecommons.org/publicdomain/zero/1.0/>.
  */
 
 #ifndef _WOF_H_
@@ -17,7 +30,7 @@
 #include "wimlib/types.h"
 
 /*
- * The Windows Overlay FileSystem Filter (WOF, a.k.a. wof.sys) is a filesystem
+ * The Windows Overlay Filesystem filter (WOF, a.k.a. wof.sys) is a filesystem
  * filter driver, available in Windows 8.1 and later, which allows files to be
  * "externally backed", meaning that their data is stored in another location,
  * possibly in compressed form.
@@ -170,16 +183,12 @@ struct WimOverlay_dat_header {
        /* Set to 0x00000028  */
        le32 unknown_0x08;
 
-       /* Set to number of WIMs registered;
-        * also the number of 'struct WimOverlay_dat_entry_1' that follow.  */
-       le32 num_entries_1;
+       /* Set to number of WIMs registered (listed in the file)  */
+       le32 num_entries;
 
-       /* Set to number of WIMs registered;
-        * also the number of 'struct WimOverlay_dat_entry_2' that follow.  */
-       le32 num_entries_2;
-
-       /* Set to 0  */
-       le32 unknown_0x14;
+       /* The next available data source ID.  This is tracked so that data
+        * source IDs are never reused, even if a WIM is unregistered.  */
+       le64 next_data_source_id;
 
        struct WimOverlay_dat_entry_1 entry_1s[];
 } _packed_attribute;
@@ -291,12 +300,12 @@ struct WimOverlay_dat_entry_2 {
        } _packed_attribute;
 } _packed_attribute;
 
-static inline void
+static _unused_attribute void
 wof_check_structs(void)
 {
-       BUILD_BUG_ON(sizeof(struct WimOverlay_dat_header) != 24);
-       BUILD_BUG_ON(sizeof(struct WimOverlay_dat_entry_1) != 40);
-       BUILD_BUG_ON(sizeof(struct WimOverlay_dat_entry_2) != 104);
+       STATIC_ASSERT(sizeof(struct WimOverlay_dat_header) == 24);
+       STATIC_ASSERT(sizeof(struct WimOverlay_dat_entry_1) == 40);
+       STATIC_ASSERT(sizeof(struct WimOverlay_dat_entry_2) == 104);
 }
 
 /*****************************************************************************
@@ -364,6 +373,8 @@ struct file_provider_external_info {
  */
 #define FSCTL_GET_EXTERNAL_BACKING 0x90310
 
+#define STATUS_OBJECT_NOT_EXTERNALLY_BACKED    0xC000046D
+
 /*****************************************************************************
  *
  * --- FSCTL_DELETE_EXTERNAL_BACKING ---