+
+#ifdef WITH_FUSE
+static int
+read_staging_file_prefix(const struct wim_lookup_table_entry *lte, u64 size,
+ consume_data_callback_t cb, void *cb_ctx)
+{
+ int raw_fd;
+ struct filedes fd;
+ int ret;
+
+ wimlib_assert(size <= lte->size);
+
+ DEBUG("Reading %"PRIu64" bytes from staging file \"%s\"",
+ size, lte->staging_file_name);
+
+ raw_fd = openat(lte->staging_dir_fd, lte->staging_file_name,
+ O_RDONLY | O_NOFOLLOW);
+ if (raw_fd < 0) {
+ ERROR_WITH_ERRNO("Can't open staging file \"%s\"",
+ lte->staging_file_name);
+ return WIMLIB_ERR_OPEN;
+ }
+ filedes_init(&fd, raw_fd);
+ ret = read_raw_file_data(&fd, 0, size, cb, cb_ctx);
+ filedes_close(&fd);
+ return ret;
+}
+#endif