X-Git-Url: https://git.gag.com/?p=debian%2Fcpmtools;a=blobdiff_plain;f=device_posix.c;fp=device_posix.c;h=fd425cafed1fdb649d087c523d46b83101a0ed57;hp=5a28dcdc5ecb4c0be201c81c0bd14081bcb05072;hb=0244ff6db7cb417c6210118e14ebc8a11924b7f6;hpb=be51a0b47ec4edacc689851a88ec6172737cb61c 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; }