X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwim.c;h=44653f191f685e95de5e4b5fc9a0b022d5fd458c;hp=500fc1ebc08f7407028be9041fb9f2defe7fbbe2;hb=7c83ef53090441de11cc78d8d26dc337cd7ac475;hpb=d5c2c580d35447207e1e8c0d62c9e55b77ba20d1 diff --git a/src/wim.c b/src/wim.c index 500fc1eb..44653f19 100644 --- a/src/wim.c +++ b/src/wim.c @@ -43,7 +43,6 @@ #include "lookup_table.h" #include "xml.h" - static int print_metadata(WIMStruct *w) { DEBUG("Printing metadata for image %d", w->current_image); @@ -421,7 +420,7 @@ WIMLIBAPI int wimlib_get_boot_idx(const WIMStruct *w) } /* Opens a WIM readable */ -int open_wim_readable(WIMStruct *w, const char *path) +static int open_wim_readable(WIMStruct *w, const char *path) { if (w->fp != NULL) fclose(w->fp); @@ -435,30 +434,6 @@ int open_wim_readable(WIMStruct *w, const char *path) return 0; } -/* Opens a WIM writable */ -int open_wim_writable(WIMStruct *w, const char *path, - bool trunc, bool readable) -{ - const char *mode; - if (trunc) - if (readable) - mode = "w+b"; - else - mode = "wb"; - else - mode = "r+b"; - - DEBUG("Opening `%s' read-write", path); - wimlib_assert(w->out_fp == NULL); - wimlib_assert(path != NULL); - w->out_fp = fopen(path, mode); - if (!w->out_fp) { - ERROR_WITH_ERRNO("Failed to open `%s' for writing", path); - return WIMLIB_ERR_OPEN; - } - return 0; -} - /* * Begins the reading of a WIM file; opens the file and reads its header and * lookup table, and optionally checks the integrity.