X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=cpmfs.h;h=06126c865797c85bf99a28884ef301bb25c43ced;hb=b1e873c5b2f6376bb39ff0fda1464cbbacbae5f7;hp=acf050f9f2a8f3af43134c35cd750a9a402f7800;hpb=749b004e4bb5830a6246a30ebe0a158e448327c5;p=debian%2Fcpmtools diff --git a/cpmfs.h b/cpmfs.h index acf050f..06126c8 100644 --- a/cpmfs.h +++ b/cpmfs.h @@ -3,6 +3,7 @@ #include #include +#include #ifdef _WIN32 #include @@ -99,9 +100,34 @@ struct cpmStat time_t ctime; }; +#define CPMFS_HI_USER (0x1<<0) /* has user numbers up to 31 */ +#define CPMFS_CPM3_DATES (0x1<<1) /* has CP/M+ style time stamps */ +#define CPMFS_CPM3_OTHER (0x1<<2) /* has passwords and disc label */ +#define CPMFS_DS_DATES (0x1<<3) /* has datestamper timestamps */ +#define CPMFS_EXACT_SIZE (0x1<<4) /* has reverse exact file size */ + #define CPMFS_DR22 0 -#define CPMFS_P2DOS 1 -#define CPMFS_DR3 2 +#define CPMFS_P2DOS (CPMFS_CPM3_DATES|CPMFS_HI_USER) +#define CPMFS_DR3 (CPMFS_CPM3_DATES|CPMFS_CPM3_OTHER|CPMFS_HI_USER) +#define CPMFS_ISX (CPMFS_EXACT_SIZE) +#define CPMFS_ZSYS (CPMFS_HI_USER) + +struct dsEntry +{ + char year; + char month; + char day; + char hour; + char minute; +}; + +struct dsDate +{ + struct dsEntry create; + struct dsEntry access; + struct dsEntry modify; + char checksum; +}; struct cpmSuperBlock { @@ -114,6 +140,7 @@ struct cpmSuperBlock int maxdir; int skew; int boottrk; + off_t offset; int type; int size; int extents; /* logical extents per physical extent */ @@ -128,6 +155,9 @@ struct cpmSuperBlock size_t passwdLength; struct cpmInode *root; int dirtyDirectory; + struct dsDate *ds; + int dirtyDs; + char libdskGeometry[256]; }; struct cpmStatFS @@ -164,8 +194,10 @@ int cpmRead(struct cpmFile *file, char *buf, int count); int cpmWrite(struct cpmFile *file, const char *buf, int count); int cpmClose(struct cpmFile *file); int cpmCreat(struct cpmInode *dir, const char *fname, struct cpmInode *ino, mode_t mode); +void cpmUtime(struct cpmInode *ino, struct utimbuf *times); int cpmSync(struct cpmSuperBlock *sb); void cpmUmount(struct cpmSuperBlock *sb); +int cpmCheckDs(struct cpmSuperBlock *sb); #ifdef __cplusplus }