* This file is part of wimlib, a library for working with WIM files.
*
* wimlib is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
+ * terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option)
* any later version.
*
* wimlib 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 GNU Lesser General Public License for more
+ * A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
- * You should have received a copy of the GNU Lesser General Public License
+ * You should have received a copy of the GNU General Public License
* along with wimlib; if not, see http://www.gnu.org/licenses/.
*/
struct wim_pair wims;
struct wim_security_data *sd;
+ if (!src_wim || !dest_wim)
+ return WIMLIB_ERR_INVALID_PARAM;
+
+ if (src_wim->hdr.total_parts != 1 || src_wim->hdr.total_parts != 1) {
+ ERROR("Exporting an image to or from a split WIM is "
+ "unsupported");
+ return WIMLIB_ERR_SPLIT_UNSUPPORTED;
+ }
+
if (src_image == WIM_ALL_IMAGES) {
if (src_wim->hdr.image_count > 1) {
int i;
int ret;
+ if (w->hdr.total_parts != 1) {
+ ERROR("Deleting an image from a split WIM is not supported.");
+ return WIMLIB_ERR_SPLIT_UNSUPPORTED;
+ }
+
if (image == WIM_ALL_IMAGES) {
num_images = w->hdr.image_count;
for (i = 1; i <= num_images; i++) {
return WIMLIB_ERR_INVALID_PARAM;
}
+ if (w->hdr.total_parts != 1) {
+ ERROR("Cannot add an image to a split WIM");
+ return WIMLIB_ERR_SPLIT_UNSUPPORTED;
+ }
+
if (wimlib_image_name_in_use(w, name)) {
ERROR("There is already an image named \"%s\" in `%s'",
name, w->filename);