mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-21 18:30:20 +00:00
use device_sector_size to set sector size to 2048
This commit is contained in:
parent
7ba120c6c5
commit
69aec7aac7
@ -11,6 +11,9 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
|
||||||
#include <libiso9660.h>
|
#include <libiso9660.h>
|
||||||
#include <libstream.h>
|
#include <libstream.h>
|
||||||
@ -44,7 +47,8 @@ int main(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
path = "/";
|
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.read_sector = (stream_read_sector_t)device_read_sector;
|
||||||
device.close = (stream_close_t)device_close;
|
device.close = (stream_close_t)device_close;
|
||||||
|
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
|
||||||
#include <libiso9660.h>
|
#include <libiso9660.h>
|
||||||
|
|
||||||
@ -46,10 +49,11 @@ int main(int argc, char **argv)
|
|||||||
iso9660_VOLUME *volume;
|
iso9660_VOLUME *volume;
|
||||||
int arg = 1;
|
int arg = 1;
|
||||||
|
|
||||||
|
device_sector_size = 2048;
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
device.data = device_open(argv[arg++]);
|
device.data = (void*)device_open(argv[arg++], O_RDONLY);
|
||||||
else
|
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.read_sector = (stream_read_sector_t)device_read_sector;
|
||||||
device.close = (stream_close_t)device_close;
|
device.close = (stream_close_t)device_close;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user