X-Git-Url: https://git.gag.com/?p=debian%2Fcpmtools;a=blobdiff_plain;f=device_posix.c;h=5a28dcdc5ecb4c0be201c81c0bd14081bcb05072;hp=0393eed716f39ae3c0edc9634c10d465166a7570;hb=b1e873c5b2f6376bb39ff0fda1464cbbacbae5f7;hpb=edf600144998d1a1e09898548938cc11b95c10bc diff --git a/device_posix.c b/device_posix.c index 0393eed..5a28dcd 100644 --- a/device_posix.c +++ b/device_posix.c @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -22,12 +23,13 @@ const char *Device_open(struct Device *this, const char *filename, int mode, con } /*}}}*/ /* Device_setGeometry -- Set disk geometry */ /*{{{*/ -void Device_setGeometry(struct Device *this, int secLength, int sectrk, int tracks, off_t offset) +const char *Device_setGeometry(struct Device *this, int secLength, int sectrk, int tracks, off_t offset, const char *libdskGeometry) { this->secLength=secLength; this->sectrk=sectrk; this->tracks=tracks; this->offset=offset; + return NULL; } /*}}}*/ /* Device_close -- Close an image file */ /*{{{*/ @@ -42,10 +44,12 @@ const char *Device_readSector(const struct Device *this, int track, int sector, { int res; + assert(this); assert(sector>=0); assert(sectorsectrk); assert(track>=0); assert(tracktracks); + assert(buf); if (lseek(this->fd,(off_t)(((sector+track*this->sectrk)*this->secLength)+this->offset),SEEK_SET)==-1) { return strerror(errno);