mirror of
https://github.com/vivier/EMILE.git
synced 2025-02-27 06:29:15 +00:00
Add some error strings
This commit is contained in:
parent
3d8cfe6db6
commit
e046538add
@ -4,6 +4,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@ -104,10 +105,16 @@ stream_t *stream_open(char *dev)
|
|||||||
|
|
||||||
current = get_fs(dev, &fs);
|
current = get_fs(dev, &fs);
|
||||||
if (current == NULL)
|
if (current == NULL)
|
||||||
|
{
|
||||||
|
printf("Cannot identify given filesystem\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
current = get_device(current, &device, &unit, &partition);
|
current = get_device(current, &device, &unit, &partition);
|
||||||
if (current == NULL)
|
if (current == NULL)
|
||||||
|
{
|
||||||
|
printf("Cannot identify given device\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
stream = (stream_t*)malloc(sizeof(stream_t));
|
stream = (stream_t*)malloc(sizeof(stream_t));
|
||||||
|
|
||||||
@ -169,7 +176,10 @@ stream_t *stream_open(char *dev)
|
|||||||
case fs_ISO9660:
|
case fs_ISO9660:
|
||||||
stream->fs.volume = iso9660_mount(&stream->device);
|
stream->fs.volume = iso9660_mount(&stream->device);
|
||||||
if (stream->fs.volume == NULL)
|
if (stream->fs.volume == NULL)
|
||||||
|
{
|
||||||
|
printf("Cannot mount volume ISO9660\n");
|
||||||
goto outfs;
|
goto outfs;
|
||||||
|
}
|
||||||
stream->fs.file = iso9660_open(stream->fs.volume, current);
|
stream->fs.file = iso9660_open(stream->fs.volume, current);
|
||||||
if (stream->fs.file == NULL)
|
if (stream->fs.file == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user