use device_sector_size to set sector size to 2048

This commit is contained in:
Laurent Vivier 2007-10-09 19:21:14 +00:00
parent 7ba120c6c5
commit 69aec7aac7
2 changed files with 11 additions and 3 deletions

View File

@ -11,6 +11,9 @@
#include <limits.h>
#include <stddef.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libiso9660.h>
#include <libstream.h>
@ -44,7 +47,8 @@ int main(int argc, char **argv)
else
path = "/";
device.data = device_open(devname);
device_sector_size = 2048;
device.data = (void*)device_open(devname, O_RDONLY);
device.read_sector = (stream_read_sector_t)device_read_sector;
device.close = (stream_close_t)device_close;

View File

@ -11,6 +11,9 @@
#include <limits.h>
#include <stddef.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libiso9660.h>
@ -46,10 +49,11 @@ int main(int argc, char **argv)
iso9660_VOLUME *volume;
int arg = 1;
device_sector_size = 2048;
if (argc > 1)
device.data = device_open(argv[arg++]);
device.data = (void*)device_open(argv[arg++], O_RDONLY);
else
device.data = device_open("/dev/cdrom");
device.data = (void*)device_open("/dev/cdrom", O_RDONLY);
device.read_sector = (stream_read_sector_t)device_read_sector;
device.close = (stream_close_t)device_close;