PREV UP NEXT The Ftape Installation and Usage Guide - MTIOCFTFORMAT


8.8.7.2: The MTIOCFTFORMAT ioctl definition

/*  possible values of the ftfmt_op field
 */
#define FTFMT_SET_PARMS         1 /* set software parms */
#define FTFMT_GET_PARMS         2 /* get software parms */
#define FTFMT_FORMAT_TRACK      3 /* start formatting a tape track   */
#define FTFMT_STATUS            4 /* monitor formatting a tape track */
#define FTFMT_VERIFY            5 /* verify the given segment        */
#define FTFMT_API_VERSION       6 /* return FTFMT_MAGIC */

#define FTFMT_MAGIC             (5 << 16) /* version of format API */
struct ftfmtparms {
        unsigned char  ft_qicstd;   /* QIC-40/QIC-80/QIC-3010/QIC-3020 */
        unsigned char  ft_fmtcode;  /* Refer to the QIC specs */
        unsigned char  ft_fhm;      /* floppy head max */
        unsigned char  ft_ftm;      /* floppy track max */
        unsigned short ft_spt;      /* segments per track */
        unsigned short ft_tpc;      /* tracks per cartridge */
        unsigned char  ft_gap3;     /* size of gap3, for FORMAT_TRK */
        unsigned char  ft_ffb;      /* format filler byte */
};
struct ftfmttrack {
        unsigned int  ft_track;   /* track to format */
};
struct ftfmtstatus {
        unsigned int  ft_segment;  /* segment currently being formatted */
};
struct ftfmtverify {
        unsigned int  ft_segment;   /* segment to verify */
        unsigned long ft_bsm;       /* bsm as result of VERIFY cmd */
};
struct mtftformat {
        unsigned int fmt_magic;   /* should be FTFMT_MAGIC */
        unsigned int fmt_op;      /* operation to perform */
        union fmt_arg {
                struct ftfmtparms  fmt_parms;  /* format parameters */
                struct ftfmttrack  fmt_track;  /* ctrl while formatting */
                struct ftfmtstatus fmt_status;
                struct ftfmtverify fmt_verify; /* for verifying */ 
        } fmt_arg;
};

#define MTIOCFTFORMAT   _IOWR('m', 10, struct mtftformat) /* format ftape */

ftape logo Use these buttons to jump to the top menu

TOP (previous node) TOP (parent node) TOP (next node) TOP (this node)