extern int
wim_checksum_unhashed_streams(WIMStruct *wim);
-extern int
-reopen_wim(WIMStruct *wim);
-
/* Internal open flags (pass to open_wim_as_WIMStruct(), not wimlib_open_wim())
*/
#define WIMLIB_OPEN_FLAG_FROM_PIPE 0x80000000
}
static int
-do_open_wim(const tchar *filename, struct filedes *fd_ret)
+open_wim_file(const tchar *filename, struct filedes *fd_ret)
{
int raw_fd;
return 0;
}
-int
-reopen_wim(WIMStruct *wim)
-{
- wimlib_assert(!filedes_valid(&wim->in_fd));
- return do_open_wim(wim->filename, &wim->in_fd);
-}
-
-int
-close_wim(WIMStruct *wim)
-{
- if (filedes_valid(&wim->in_fd)) {
- filedes_close(&wim->in_fd);
- filedes_invalidate(&wim->in_fd);
- }
- return 0;
-}
-
/*
* Begins the reading of a WIM file; opens the file and reads its header and
* lookup table, and optionally checks the integrity.
wim->in_fd.is_pipe = 1;
} else {
wimfile = wim_filename_or_fd;
- ret = do_open_wim(wimfile, &wim->in_fd);
+ ret = open_wim_file(wimfile, &wim->in_fd);
if (ret)
return ret;
return ret;
}
- close_wim(wim);
+ if (filedes_valid(&wim->in_fd)) {
+ filedes_close(&wim->in_fd);
+ filedes_invalidate(&wim->in_fd);
+ }
/* Rename the new WIM file to the original WIM file. Note: on Windows
* this actually calls win32_rename_replacement(), not _wrename(), so