linux/include/linux/cdrom.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * -- <linux/cdrom.h>
 * General header file for linux CD-ROM drivers 
 * Copyright (C) 1992         David Giller, [email protected]
 *               1994, 1995   Eberhard Mönkeberg, [email protected]
 *               1996         David van Leeuwen, [email protected]
 *               1997, 1998   Erik Andersen, [email protected]
 *               1998-2002    Jens Axboe, [email protected]
 */
#ifndef	_LINUX_CDROM_H
#define _LINUX_CDROM_H

#include <linux/fs.h>		/* not really needed, later.. */
#include <linux/list.h>
#include <linux/blkdev.h>
#include <scsi/scsi_common.h>
#include <uapi/linux/cdrom.h>

struct packet_command
{};

/*
 * _OLD will use PIO transfer on atapi devices, _BPC_* will use DMA
 */
#define CDDA_OLD
#define CDDA_BPC_SINGLE
#define CDDA_BPC_FULL

/* Uniform cdrom data structures for cdrom.c */
struct cdrom_device_info {};

struct cdrom_device_ops {};

int cdrom_multisession(struct cdrom_device_info *cdi,
		struct cdrom_multisession *info);
int cdrom_read_tocentry(struct cdrom_device_info *cdi,
		struct cdrom_tocentry *entry);

/* the general block_device operations structure: */
int cdrom_open(struct cdrom_device_info *cdi, blk_mode_t mode);
void cdrom_release(struct cdrom_device_info *cdi);
int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
		unsigned int cmd, unsigned long arg);
extern unsigned int cdrom_check_events(struct cdrom_device_info *cdi,
				       unsigned int clearing);

extern int register_cdrom(struct gendisk *disk, struct cdrom_device_info *cdi);
extern void unregister_cdrom(struct cdrom_device_info *cdi);

tracktype;

extern int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written);
extern int cdrom_number_of_slots(struct cdrom_device_info *cdi);
extern int cdrom_mode_select(struct cdrom_device_info *cdi,
			     struct packet_command *cgc);
extern int cdrom_mode_sense(struct cdrom_device_info *cdi,
			    struct packet_command *cgc,
			    int page_code, int page_control);
extern void init_cdrom_command(struct packet_command *cgc,
			       void *buffer, int len, int type);
extern int cdrom_dummy_generic_packet(struct cdrom_device_info *cdi,
				      struct packet_command *cgc);

/* The SCSI spec says there could be 256 slots. */
#define CDROM_MAX_SLOTS

struct cdrom_mechstat_header {};

struct cdrom_slot {};

struct cdrom_changer_info {};

mechtype_t;

write_param_page;

struct modesel_head
{};

rpc_state_t;

struct event_header {};

struct media_event_desc {};

extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med);

static inline void lba_to_msf(int lba, u8 *m, u8 *s, u8 *f)
{}

static inline int msf_to_lba(u8 m, u8 s, u8 f)
{}
#endif  /* _LINUX_CDROM_H */