Esempio n. 1
0
File: bs_rbd.c Progetto: chitr/tgt
static __attribute__((constructor)) void bs_rbd_constructor(void)
{
	register_backingstore_template(&rbd_bst);
}
Esempio n. 2
0
__attribute__((constructor)) static void bs_null_constructor(void)
{
    register_backingstore_template(&null_bst);
}
Esempio n. 3
0
__attribute__((constructor)) static void bs_rdwr_constructor(void)
{
	unsigned char sbc_opcodes[] = {
		ALLOW_MEDIUM_REMOVAL,
		COMPARE_AND_WRITE,
		FORMAT_UNIT,
		INQUIRY,
		MAINT_PROTOCOL_IN,
		MODE_SELECT,
		MODE_SELECT_10,
		MODE_SENSE,
		MODE_SENSE_10,
		ORWRITE_16,
		PERSISTENT_RESERVE_IN,
		PERSISTENT_RESERVE_OUT,
		PRE_FETCH_10,
		PRE_FETCH_16,
		READ_10,
		READ_12,
		READ_16,
		READ_6,
		READ_CAPACITY,
		RELEASE,
		REPORT_LUNS,
		REQUEST_SENSE,
		RESERVE,
		SEND_DIAGNOSTIC,
		SERVICE_ACTION_IN,
		START_STOP,
		SYNCHRONIZE_CACHE,
		SYNCHRONIZE_CACHE_16,
		TEST_UNIT_READY,
		UNMAP,
		VERIFY_10,
		VERIFY_12,
		VERIFY_16,
		WRITE_10,
		WRITE_12,
		WRITE_16,
		WRITE_6,
		WRITE_SAME,
		WRITE_SAME_16,
		WRITE_VERIFY,
		WRITE_VERIFY_12,
		WRITE_VERIFY_16
	};
	bs_create_opcode_map(&rdwr_bst, sbc_opcodes, ARRAY_SIZE(sbc_opcodes));
	register_backingstore_template(&rdwr_bst);

	unsigned char mmc_opcodes[] = {
		ALLOW_MEDIUM_REMOVAL,
		CLOSE_TRACK,
		GET_CONFIGURATION,
		GET_PERFORMACE,
		INQUIRY,
		MODE_SELECT,
		MODE_SELECT_10,
		MODE_SENSE,
		MODE_SENSE_10,
		PERSISTENT_RESERVE_IN,
		PERSISTENT_RESERVE_OUT,
		READ_10,
		READ_12,
		READ_BUFFER_CAP,
		READ_CAPACITY,
		READ_DISK_INFO,
		READ_DVD_STRUCTURE,
		READ_TOC,
		READ_TRACK_INFO,
		RELEASE,
		REPORT_LUNS,
		REQUEST_SENSE,
		RESERVE,
		SET_CD_SPEED,
		SET_STREAMING,
		START_STOP,
		SYNCHRONIZE_CACHE,
		TEST_UNIT_READY,
		VERIFY_10,
		WRITE_10,
		WRITE_12,
		WRITE_VERIFY,
	};
	bs_create_opcode_map(&mmc_bst, mmc_opcodes, ARRAY_SIZE(mmc_opcodes));
	register_backingstore_template(&mmc_bst);

	unsigned char smc_opcodes[] = {
		INITIALIZE_ELEMENT_STATUS,
		INITIALIZE_ELEMENT_STATUS_WITH_RANGE,
		INQUIRY,
		MAINT_PROTOCOL_IN,
		MODE_SELECT,
		MODE_SELECT_10,
		MODE_SENSE,
		MODE_SENSE_10,
		MOVE_MEDIUM,
		PERSISTENT_RESERVE_IN,
		PERSISTENT_RESERVE_OUT,
		REQUEST_SENSE,
		TEST_UNIT_READY,
		READ_ELEMENT_STATUS,
		RELEASE,
		REPORT_LUNS,
		RESERVE,
	};
	bs_create_opcode_map(&smc_bst, smc_opcodes, ARRAY_SIZE(smc_opcodes));
	register_backingstore_template(&smc_bst);
}