X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fwimlib.h;h=08fb9a0f5d0e1ca890d6b586c6715a8688dfa251;hb=e76cdf475d666be9c782465e970e177ecad7a434;hp=6033576be6489d96823e9757c150dede40958a9f;hpb=9c4d58824c53710f891cfab234bf0bc697030ebe;p=wimlib diff --git a/src/wimlib.h b/src/wimlib.h index 6033576b..08fb9a0f 100644 --- a/src/wimlib.h +++ b/src/wimlib.h @@ -211,6 +211,10 @@ #include #include +#define WIMLIB_MAJOR_VERSION 1 +#define WIMLIB_MINOR_VERSION 2 +#define WIMLIB_PATCH_VERSION 0 + /** * Opaque structure that represents a WIM file. This is an in-memory structure * and need not correspond to a specific on-disk file. However, a ::WIMStruct @@ -663,6 +667,7 @@ typedef int (*wimlib_progress_func_t)(enum wimlib_progress_msg msg_type, */ enum wimlib_error_code { WIMLIB_ERR_SUCCESS = 0, + WIMLIB_ERR_ALREADY_LOCKED, WIMLIB_ERR_COMPRESSED_LOOKUP_TABLE, WIMLIB_ERR_DECOMPRESSION, WIMLIB_ERR_DELETE_STAGING_DIR, @@ -1390,10 +1395,17 @@ extern int wimlib_join(const char **swms, unsigned num_swms, * This number should be one less than the total number of parts in the * split WIM. Set to 0 if the WIM is a standalone WIM. * @param staging_dir - * Currently ignored, but may provide a way to specify the staging - * directory in the future. Set to @c NULL. + * If non-NULL, the name of a directory in which the staging directory will + * be created. Ignored if ::WIMLIB_MOUNT_FLAG_READWRITE is not specified + * in @a mount_flags. If left @c NULL, the staging directory is created in + * the same directory as the WIM file that @a wim was originally read from. * * @return 0 on success; nonzero on error. + * @retval ::WIMLIB_ERR_ALREADY_LOCKED + * A read-write mount was requested, but an an exclusive advisory lock on + * the on-disk WIM file could not be acquired because another thread or + * process has mounted an image from the WIM read-write or is currently + * modifying the WIM in-place. * @retval ::WIMLIB_ERR_DECOMPRESSION * Could not decompress the metadata resource for @a image in @a wim. * @retval ::WIMLIB_ERR_FUSE @@ -1571,6 +1583,11 @@ extern int wimlib_open_wim(const char *wim_file, int open_flags, * * @return 0 on success; nonzero on error. This function may return any value * returned by wimlib_write() as well as the following error codes: + * @retval ::WIMLIB_ERR_ALREADY_LOCKED + * The WIM was going to be modifien in-place (with no temporary file), but + * an exclusive advisory lock on the on-disk WIM file could not be acquired + * because another thread or process has mounted an image from the WIM + * read-write or is currently modifying the WIM in-place. * @retval ::WIMLIB_ERR_NO_FILENAME * @a wim corresponds to a WIM created with wimlib_create_new_wim() rather * than a WIM read with wimlib_open_wim(). @@ -1740,8 +1757,8 @@ extern void wimlib_print_wim_information(const WIMStruct *wim); * image, indexed starting at 1, is returned. If the keyword "all" or "*" * was specified, ::WIMLIB_ALL_IMAGES is returned. Otherwise, * ::WIMLIB_NO_IMAGE is returned. If @a image_name_or_num was @c NULL or - * the empty string, ::WIM_NO_IMAGE is returned, even if one or more images - * in @a wim has no name. + * the empty string, ::WIMLIB_NO_IMAGE is returned, even if one or more + * images in @a wim has no name. */ extern int wimlib_resolve_image(WIMStruct *wim, const char *image_name_or_num);