X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device_posix.c;h=fd425cafed1fdb649d087c523d46b83101a0ed57;hb=e835c6ef8d5a9d39cf0f2875faf38e63636045ba;hp=5a28dcdc5ecb4c0be201c81c0bd14081bcb05072;hpb=b1e873c5b2f6376bb39ff0fda1464cbbacbae5f7;p=debian%2Fcpmtools diff --git a/device_posix.c b/device_posix.c index 5a28dcd..fd425ca 100644 --- a/device_posix.c +++ b/device_posix.c @@ -8,15 +8,15 @@ #include #include "device.h" - -#ifdef USE_DMALLOC -#include -#endif /*}}}*/ /* Device_open -- Open an image file */ /*{{{*/ const char *Device_open(struct Device *this, const char *filename, int mode, const char *deviceOpts) { + if (deviceOpts != NULL) + { + return "POSIX driver accepts no options (build compiled without libdsk)"; + } this->fd=open(filename,mode); this->opened=(this->fd==-1?0:1); return ((this->fd==-1)?strerror(errno):(const char*)0); @@ -60,7 +60,11 @@ const char *Device_readSector(const struct Device *this, int track, int sector, { return strerror(errno); } - else memset(buf+res,0,this->secLength-res); /* hit end of disk image */ + else +{ +printf("len %d\n",this->secLength-res); + memset(buf+res,0,this->secLength-res); /* hit end of disk image */ +} } return (const char*)0; }