SMCIOC_LOAD_MEDIUM
This IOCTL command loads a tape from a specific slot into the drive. Or, it loads from the first full slot into the drive if the slot address is specified as zero.
An example of the SMCIOC_LOAD_MEDIUM command
is
#include <sys/IBM_tape.h>
/* load cartridge from slot 3 */
if (ioctl (tapefd, SMCIOC_LOAD_MEDIUM,3)) {
printf ("IOCTL failure. errno=%d\n",errno);
exit(1);
}
/* load first cartridge from magazine */
if (ioctl (tapefd, SMCIOC_LOAD_MEDIUM,0)) {
printf ("IOCTL failure. errno=%d\n",errno);
exit(1);
}