SIOC_DISABLE_PATH

This IOCTL command manually disables (fences) the device driver from using either the primary or an alternate SCSI path to a device until the SIOC_ENABLE_PATH command is issued for the same path that is manually disabled. The arg parameter on the IOCTL command specifies the path to be disabled. The primary path is path 1, the first alternate path 2, the second alternate path 3, and so on. This command can be used concurrently when the device is already open by another process by using the openx() extended parameter SC_TMCP.

This IOCTL command is valid only if the device has one or more alternate paths configured. Otherwise, the IOCTL command fails with errno set to EINVAL. The SIOC_DEVICE_PATHS IOCTL command can be used to determine the paths that are enabled or manually disabled.

An example of the SIOC_DISABLE_PATH command is
#include <sys/Atape.h>

/* Disable primary SCSI path */
ioctl(fd, SIOC_DISABLE_PATH, PRIMARY_SCSI_PATH);

/* Disable alternate SCSI path */
ioctl(fd, SIOC_DISABLE_PATH, ALTERNATE_SCSI_PATH);