linux/include/uapi/linux/chio.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * ioctl interface for the scsi media changer driver
 */

#ifndef _UAPI_LINUX_CHIO_H
#define _UAPI_LINUX_CHIO_H

/* changer element types */
#define CHET_MT
#define CHET_ST
#define CHET_IE
#define CHET_DT
#define CHET_V1
#define CHET_V2
#define CHET_V3
#define CHET_V4


/*
 * CHIOGPARAMS
 *    query changer properties
 *
 * CHIOVGPARAMS
 *    query vendor-specific element types
 *
 *    accessing elements works by specifing type and unit of the element.
 *    for example, storage elements are addressed with type = CHET_ST and
 *    unit = 0 .. cp_nslots-1
 *
 */
struct changer_params {};
struct changer_vendor_params {};


/*
 * CHIOMOVE
 *    move a medium from one element to another
 */
struct changer_move {};
#define CM_INVERT


/*
 * CHIOEXCHANGE
 *    move one medium from element #1 to element #2,
 *    and another one from element #2 to element #3.
 *    element #1 and #3 are allowed to be identical.
 */
struct changer_exchange {};
#define CE_INVERT1
#define CE_INVERT2


/*
 * CHIOPOSITION
 *    move the transport element (robot arm) to a specific element.
 */
struct changer_position {};
#define CP_INVERT


/*
 * CHIOGSTATUS
 *    get element status for all elements of a specific type
 */
struct changer_element_status {};
#define CESTATUS_FULL
#define CESTATUS_IMPEXP
#define CESTATUS_EXCEPT
#define CESTATUS_ACCESS
#define CESTATUS_EXENAB
#define CESTATUS_INENAB


/*
 * CHIOGELEM
 *    get more detailed status information for a single element
 */
struct changer_get_element {};
/* flags */
#define CGE_ERRNO
#define CGE_INVERT
#define CGE_SRC
#define CGE_IDLUN
#define CGE_PVOLTAG
#define CGE_AVOLTAG


/*
 * CHIOSVOLTAG
 *    set volume tag
 */
struct changer_set_voltag {};
#define CSV_PVOLTAG
#define CSV_AVOLTAG
#define CSV_CLEARTAG

/* ioctls */
#define CHIOMOVE
#define CHIOEXCHANGE
#define CHIOPOSITION
#define CHIOGPICKER
#define CHIOSPICKER
#define CHIOGPARAMS
#define CHIOGSTATUS
#define CHIOGELEM
#define CHIOINITELEM
#define CHIOSVOLTAG
#define CHIOGVPARAMS

#endif /* _UAPI_LINUX_CHIO_H */