]> wimlib.net Git - wimlib/commitdiff
Comments
authorEric Biggers <ebiggers3@gmail.com>
Fri, 24 Aug 2012 01:39:35 +0000 (20:39 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 24 Aug 2012 01:39:35 +0000 (20:39 -0500)
src/extract.c
src/hardlink.c
src/ntfs-apply.c
src/symlink.c

index d22f209bbe33351ff69ea97366b6da452432eded..ec6842dcf826ab96a4ea3146e416ab20000130ee 100644 (file)
@@ -2,6 +2,11 @@
  * extract.c
  *
  * Support for extracting WIM files.
  * extract.c
  *
  * Support for extracting WIM files.
+ *
+ * This code does NOT contain any filesystem-specific features.  In particular,
+ * security information (i.e. file permissions) and alternate data streams are
+ * ignored, except possibly to read an alternate data stream that contains
+ * symbolic link data.
  */
 
 /*
  */
 
 /*
index b32309fd407735a262759de7c3a2131b49815082..c5324e74ec6c9e9921049c1d3ffcc8c6bc490d2a 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * hardlink.c
+ *
+ * Code to deal with hard links in WIMs.  Essentially, the WIM dentries are put
+ * into a hash table indexed by the hard link group ID field, then for each hard
+ * link group, a linked list is made to connect the dentries.
+ */
+
 /*
  * Copyright (C) 2012 Eric Biggers
  *
 /*
  * Copyright (C) 2012 Eric Biggers
  *
index 9b10b3e30e58129621793ebf1a286d390c2cd44c..6243a914dfd3a2a6e05527e5afb66c85b5d828c9 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * ntfs-apply.c
+ *
+ * Apply a WIM image to a NTFS volume, restoring everything we can, including
+ * security data and alternate data streams.  There should be no loss of
+ * information.
+ */
+
 /*
  * Copyright (C) 2012 Eric Biggers
  *
 /*
  * Copyright (C) 2012 Eric Biggers
  *
@@ -371,6 +379,14 @@ static int do_wim_apply_image_ntfs(WIMStruct *w, const char *device, int extract
        return ret;
 }
 
        return ret;
 }
 
+
+/* 
+ * API entry point for applying a WIM image to a NTFS volume.
+ *
+ * Please note that this is a NTFS *volume* and not a directory.  The intention
+ * is that the volume contain an empty filesystem, and the WIM image contain a
+ * full filesystem to be applied to the volume.
+ */
 WIMLIBAPI int wimlib_apply_image_to_ntfs_volume(WIMStruct *w, int image,
                                                const char *device, int flags)
 {
 WIMLIBAPI int wimlib_apply_image_to_ntfs_volume(WIMStruct *w, int image,
                                                const char *device, int flags)
 {
@@ -384,7 +400,7 @@ WIMLIBAPI int wimlib_apply_image_to_ntfs_volume(WIMStruct *w, int image,
                return WIMLIB_ERR_INVALID_PARAM;
        }
        if (flags & (WIMLIB_EXTRACT_FLAG_SYMLINK | WIMLIB_EXTRACT_FLAG_HARDLINK)) {
                return WIMLIB_ERR_INVALID_PARAM;
        }
        if (flags & (WIMLIB_EXTRACT_FLAG_SYMLINK | WIMLIB_EXTRACT_FLAG_HARDLINK)) {
-               ERROR("Cannot specifcy symlink or hardlink flags when applying ");
+               ERROR("Cannot specify symlink or hardlink flags when applying ");
                ERROR("directly to a NTFS volume");
                return WIMLIB_ERR_INVALID_PARAM;
        }
                ERROR("directly to a NTFS volume");
                return WIMLIB_ERR_INVALID_PARAM;
        }
index aa54e6bd85ae18cf2230943d1f252abe3a0a50fc..ca2e422fca2176e49f6f6b1054bc0667736bcce0 100644 (file)
@@ -1,3 +1,9 @@
+/*
+ * symlink.c
+ *
+ * Code to read and set symbolic links in WIM files.
+ */
+
 /*
  * Copyright (C) 2012 Eric Biggers
  *
 /*
  * Copyright (C) 2012 Eric Biggers
  *
@@ -99,7 +105,12 @@ static ssize_t get_symlink_name(const u8 *resource, size_t resource_len,
                translated_target += 4;
                link_target_len -= 4;
                /* There's a drive letter, so just leave the backslashes since
                translated_target += 4;
                link_target_len -= 4;
                /* There's a drive letter, so just leave the backslashes since
-                * it won't go anyhwere on UNIX anyway... */
+                * it won't go anyhwere on UNIX anyway... 
+                *
+                * XXX
+                * NTFS-3g tries to re-map these links to actually point to
+                * something, so maybe we could do something like that here
+                * XXX*/
        } else {
                for (size_t i = 0; i < link_target_len; i++)
                        if (translated_target[i] == '\\')
        } else {
                for (size_t i = 0; i < link_target_len; i++)
                        if (translated_target[i] == '\\')