PREV UP NEXT The Ftape Installation and Usage Guide - zftape devices


8.1.4.2: Overview

To support some new features, I added new flag bits to the minor device number. These are (see [/usr/src/ftape-4.04/]include/linux/zftape.h) (1):

#define ZFTAPE_Q80_MODE    8 (= bit 3)
#define ZFTAPE_RAW_MODE   32 (= bit 5)

Already present in Bas Laarhoven's original ftape was bit 2, indicating the non-rewind mode (see Rewinding and non-rewinding devices) of the driver, and the meaning of the first two bits that indicate the drive selection mode.See Drive selection.

There used to be another bit, namely

#define ZFTAPE_ZIP_MODE   16 (= bit 4)

This bit of the minor device number used to switch-on ftape-3.04d's user-transparent compression feature (or bug). ftape-4.04 still understands this bit, but doesn't support writing of compressed archives any more; however, decompression of compressed archives produced by ftape-3.04d is still supported. Consequently, the ftape-4.04 treats the tape cartridge as write protected when used with a device node with this bit set (i.e. `/dev/zqft0', `/dev/nzqft0' etc.).

The actual minor-device number is simply computed by a bitwise `or' of the bits that correspond to the desired features. A non rewinding device for example has the following minor device number (drive selection method A):

  FTAPE_NO_REWIND | ZFTAPE_SELECT_A
=        4        |         0 
= 0x04 = 4

Consequently, there are 16 different ftape devices.

And, if you also count the obsolete devices `/dev/[n]zqft0', ..., `/dev/[n]zqft0', eight additional device-nodes which are only kept in order not to break compatibility with older versions of the ftape driver.


(1) The meaning of the ZFTAPE_Q80_MODE bit has changed from version 1.02 to version 1.03. To be more precise, this bit is meaningless now, it is just kept for compatibility reasons.


ftape logo Use these buttons to jump to the top menu

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