Commit 3b9d1c72 authored by Petri Hintukainen's avatar Petri Hintukainen

Fix checking if file exists in udf image

parent c6a7390b
......@@ -158,7 +158,7 @@ static int _bdrom_have_file(void *p, const char *dir, const char *file)
char *path;
path = str_printf("%s" DIR_SEP "%s", dir, file);
fp = dev->pf_file_open_bdrom(dev->file_open_handle, path);
fp = dev->pf_file_open_bdrom(dev->file_open_bdrom_handle, path);
X_FREE(path);
if (fp) {
......@@ -190,7 +190,7 @@ static int _libaacs_init(BD_DEC *dec, struct dec_dev *dev,
return 0;
}
result = libaacs_open(dec->aacs, dev->device, dev->file_open_handle, dev->pf_file_open_vfs, keyfile_path);
result = libaacs_open(dec->aacs, dev->device, dev->file_open_vfs_handle, dev->pf_file_open_vfs, keyfile_path);
i->aacs_error_code = result;
i->aacs_handled = !result;
......@@ -235,7 +235,7 @@ static int _libbdplus_init(BD_DEC *dec, struct dec_dev *dev,
return 0;
}
if (libbdplus_init(dec->bdplus, dev->root, dev->file_open_handle, dev->pf_file_open_bdrom, vid, mk)) {
if (libbdplus_init(dec->bdplus, dev->root, dev->file_open_bdrom_handle, dev->pf_file_open_bdrom, vid, mk)) {
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bdplus_init() failed\n");
i->bdplus_handled = 0;
......
......@@ -35,8 +35,9 @@ typedef struct bd_file_s * (*file_openFp)(void *, const char *);
/* device to use */
struct dec_dev {
void *file_open_handle;
void *file_open_bdrom_handle;
file_openFp pf_file_open_bdrom;
void *file_open_vfs_handle;
file_openFp pf_file_open_vfs;
const char *root; /* may be NULL if disc is not mounted */
const char *device; /* may be null if not reading from real device */
......
......@@ -246,11 +246,11 @@ BD_DISC *disc_open(const char *device_path,
}
} else {
dir_close(dp_img);
BD_DEBUG(DBG_FILE | DBG_CRIT, "%s does not seem to be image file or device node\n", device_path);
BD_DEBUG(DBG_FILE, "%s does not seem to be image file or device node\n", device_path);
}
#endif
struct dec_dev dev = { p, p->pf_file_open_bdrom, (file_openFp)disc_open_path, p->disc_root, p->disc_device };
struct dec_dev dev = { p->fs_handle, p->pf_file_open_bdrom, p, (file_openFp)disc_open_path, p->disc_root, p->disc_device };
p->dec = dec_init(&dev, enc_info, keyfile_path, regs, psr_read, psr_write);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment