Add some error strings

This commit is contained in:
Laurent Vivier 2005-11-22 23:11:42 +00:00
parent 3d8cfe6db6
commit e046538add

View File

@ -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)
{ {