4 * Capture a WIM image from a NTFS volume. We capture everything we can,
5 * including security data and alternate data streams. There should be no loss
10 * Copyright (C) 2012 Eric Biggers
12 * This file is part of wimlib, a library for working with WIM files.
14 * wimlib is free software; you can redistribute it and/or modify it under the
15 * terms of the GNU Lesser General Public License as published by the Free
16 * Software Foundation; either version 2.1 of the License, or (at your option)
19 * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
20 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
24 * You should have received a copy of the GNU Lesser General Public License
25 * along with wimlib; if not, see http://www.gnu.org/licenses/.
29 #include "wimlib_internal.h"
34 #include "lookup_table.h"
36 #include <ntfs-3g/layout.h>
37 #include <ntfs-3g/acls.h>
38 #include <ntfs-3g/attrib.h>
39 #include <ntfs-3g/misc.h>
40 #include <ntfs-3g/reparse.h>
41 #include <ntfs-3g/security.h>
42 #include <ntfs-3g/volume.h>
47 WIMLIBAPI int wimlib_add_image_from_ntfs_volume(WIMStruct *w,
50 const char *description,
51 const char *flags_element,
57 return WIMLIB_ERR_INVALID_PARAM;
58 if (flags & (WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE)) {
59 ERROR("Cannot dereference files when capturing directly from NTFS");
60 return WIMLIB_ERR_INVALID_PARAM;
65 #else /* WITH_NTFS_3G */
66 WIMLIBAPI int wimlib_add_image_from_ntfs_volume(WIMStruct *w,
69 const char *description,
70 const char *flags_element,
73 ERROR("wimlib was compiled without support for NTFS-3g, so");
74 ERROR("we cannot capture a WIM image directly from a NTFS volume");
75 return WIMLIB_ERR_UNSUPPORTED;
77 #endif /* WITH_NTFS_3G */