udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Typedefs | Functions | Variables
ide-pc.c File Reference
`#include "config.h"`
`#include <stdio.h>`
`#include <string.h>`
`#include <stdarg.h>`
`#include <errno.h>`
`#include <sys/ioctl.h>`
`#include <sys/types.h>`
`#include <linux/cdrom.h>`
`#include <unistd.h>`
`#include <stdlib.h>`
`#include "bswap.h"`
`#include "ide-pc.h"`
Include dependency graph for ide-pc.c:

Go to the source code of this file.

## Typedefs
typedef struct cdrom_generic_command | CGC

## Functions
void | fail (char *fmt,...)
struct request_sense * | get_sense_data ()
char * | get_sense_string ()
void | initpc (CGC *pc)
int | blank (int fd, int type, int start)
int | close_track_session (int fd, int close_track, int track)
int | format (int fd, int session_grow, int size)
int | set_cdspeed (int fd, int readspeed, int writespeed)
int | synchronize_cache (int fd)
int | test_unit_ready (int fd)
int | getDriveState (int fd)
int | inquiry (int fd, struct cdrom_inquiry *inq)
int | mediumRemoval (int fd, int allow)
int | read_reccapacity (int fd, struct cdrom_reccapacity *reccap)
int | read_buffercapacity (int fd, struct cdrom_buffercapacity *bufcap)
int | reserve_track (int fd, int size)
int | startStopUnit (int fd, int action)
int | read_discinfo (int fd, struct cdrom_discinfo *di)
int | read_header (int fd, struct cdrom_header *hd, u_int block)
int | read_trackinfo (int fd, struct cdrom_trackinfo *ti, int trackno)
int | readCD (int fd, int sectortype, int lba, int n, unsigned char *buf)
int | writeCD (int fd, int lba, int nblks, unsigned char *buf)
int | mode_select (int fd, u_char *buffer)
int | mode_sense (int fd, u_char **buffer, u_char **mode, u_char pageno, int pgctl)
int | get_writeparams (int fd, u_char **buffer, struct cdrom_writeparams **wp, int pgctl)
int | set_writeparams (int fd, u_char *buffer, struct cdrom_writeparams *wp)
int | get_capabilities (int fd, u_char **buffer, struct cdrom_capabilities **cap, int pgctl)

## Variables
static int | rv
static struct request_sense | sense_data

## Typedef Documentation

typedef struct cdrom_generic_command CGC

Definition at line 37 of file ide-pc.c.

## Function Documentation

int blank | ( | int | fd,
|  | int | type,
|  | int | start
| ) |  |

Definition at line 77 of file ide-pc.c.

int close_track_session | ( | int | fd,
|  | int | close_track,
|  | int | track
| ) |  |

Definition at line 90 of file ide-pc.c.

void fail | ( | char * | fmt,
|  |  | ...
| ) |  |

Definition at line 43 of file ide-pc.c.

int format | ( | int | fd,
|  | int | session_grow,
|  | int | size
| ) |  |

Definition at line 102 of file ide-pc.c.

int get_capabilities | ( | int | fd,
|  | u_char ** | buffer,
|  | struct cdrom_capabilities ** | cap,
|  | int | pgctl
| ) |  |

Definition at line 509 of file ide-pc.c.

struct request_sense* get_sense_data | ( |  | ) |

Definition at line 52 of file ide-pc.c.

char* get_sense_string | ( | void |  | ) |

Definition at line 58 of file ide-pc.c.

int get_writeparams | ( | int | fd,
|  | u_char ** | buffer,
|  | struct cdrom_writeparams ** | wp,
|  | int | pgctl
| ) |  |

Definition at line 486 of file ide-pc.c.

int getDriveState | ( | int | fd | ) |

Definition at line 164 of file ide-pc.c.

void initpc | ( | CGC * | pc | ) |

Definition at line 68 of file ide-pc.c.

int inquiry | ( | int | fd,
|  | struct cdrom_inquiry * | inq
| ) |  |

Definition at line 189 of file ide-pc.c.

int mediumRemoval | ( | int | fd,
|  | int | allow
| ) |  |

Definition at line 203 of file ide-pc.c.

int mode_select | ( | int | fd,
|  | u_char * | buffer
| ) |  |

Definition at line 400 of file ide-pc.c.

int mode_sense | ( | int | fd,
|  | u_char ** | buffer,
|  | u_char ** | mode,
|  | u_char | pageno,
|  | int | pgctl
| ) |  |

Definition at line 416 of file ide-pc.c.

int read_buffercapacity | ( | int | fd,
|  | struct cdrom_buffercapacity * | bufcap
| ) |  |

Definition at line 231 of file ide-pc.c.

int read_discinfo | ( | int | fd,
|  | struct cdrom_discinfo * | di
| ) |  |

Definition at line 270 of file ide-pc.c.

int read_header | ( | int | fd,
|  | struct cdrom_header * | hd,
|  | u_int | block
| ) |  |

Definition at line 290 of file ide-pc.c.

int read_reccapacity | ( | int | fd,
|  | struct cdrom_reccapacity * | reccap
| ) |  |

Definition at line 215 of file ide-pc.c.

int read_trackinfo | ( | int | fd,
|  | struct cdrom_trackinfo * | ti,
|  | int | trackno
| ) |  |

Definition at line 308 of file ide-pc.c.

int readCD | ( | int | fd,
|  | int | sectortype,
|  | int | lba,
|  | int | n,
|  | unsigned char * | buf
| ) |  |

Definition at line 332 of file ide-pc.c.

int reserve_track | ( | int | fd,
|  | int | size
| ) |  |

Definition at line 248 of file ide-pc.c.

int set_cdspeed | ( | int | fd,
|  | int | readspeed,
|  | int | writespeed
| ) |  |

Definition at line 130 of file ide-pc.c.

int set_writeparams | ( | int | fd,
|  | u_char * | buffer,
|  | struct cdrom_writeparams * | wp
| ) |  |

Definition at line 495 of file ide-pc.c.

int startStopUnit | ( | int | fd,
|  | int | action
| ) |  |

Definition at line 259 of file ide-pc.c.

int synchronize_cache | ( | int | fd | ) |

Definition at line 143 of file ide-pc.c.

int test_unit_ready | ( | int | fd | ) |

Definition at line 153 of file ide-pc.c.

int writeCD | ( | int | fd,
|  | int | lba,
|  | int | nblks,
|  | unsigned char * | buf
| ) |  |

Definition at line 349 of file ide-pc.c.

## Variable Documentation

int rv
| static

Definition at line 39 of file ide-pc.c.

struct request_sense sense_data
| static

Definition at line 40 of file ide-pc.c.