udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Functions
cdrwtool.h File Reference
`#include <inttypes.h>`
`#include <linux/cdrom.h>`
`#include "../include/libudffs.h"`
Include dependency graph for cdrwtool.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | write_params_t
struct | cdrw_disc
struct | disc_info
struct | track_info
struct | opc_table
struct | disc_capacity

## Macros
#define | CDROM_DEVICE "/dev/scd1"
#define | HZ sysconf(_SC_CLK_TCK)
#define | WAIT_PC (5 * HZ)
#define | WAIT_SYNC (25 * HZ)
#define | WAIT_BLANK (60 * 60 * HZ)
#define | USE_IMMED 0
#define | PAGE_CURRENT 0
#define | PAGE_CHANGE 1
#define | PAGE_DEFAULT 2
#define | PAGE_SAVE 3
#define | BLANK_FULL 1
#define | BLANK_FAST 2
#define | WRITE_MODE1 1
#define | WRITE_MODE2 2 /* mode2, form 1 */
#define | CDROM_BLOCK 2048
#define | PACKET_BLOCK 32
#define | PACKET_SIZE CDROM_BLOCK*PACKET_BLOCK
#define | NAME_MAX 255
#define | DEFAULT_SPEED 12
#define | be16_to_cpu(x)
#define | be32_to_cpu(x)

## Typedefs
typedef struct disc_info | disc_info_t
typedef struct track_info | track_info_t
typedef struct opc_table | opc_table_t
typedef struct disc_capacity | disc_capacity_t

## Functions
int | msf_to_lba (int, int, int)
void | hexdump (const void *, int)
void | dump_sense (unsigned char *, struct request_sense *)
int | wait_cmd (int, struct cdrom_generic_command *, unsigned char *, int, int)
int | mode_select (int, unsigned char *, int)
int | mode_sense (int, unsigned char *, int, char, int)
int | set_write_mode (int, write_params_t *)
int | get_write_mode (int, write_params_t *)
int | sync_cache (int)
int | write_blocks (int, unsigned char *, int, int)
int | write_file (int, struct cdrw_disc *)
int | blank_disc (int, int)
int | format_disc (int, struct cdrw_disc *)
int | read_disc_info (int, disc_info_t *)
int | read_track_info (int, track_info_t *, int)
int | reserve_track (int, struct cdrw_disc *)
int | close_track (int, unsigned int)
int | close_session (int, unsigned int)
int | read_buffer_cap (int, struct cdrw_disc *)
int | set_cd_speed (int, int)
void | cdrom_close (int)
int | cdrom_open_check (int)
void | print_disc_info (disc_info_t *)
void | print_track_info (track_info_t *)
int | print_disc_track_info (int)
void | make_write_page (write_params_t *, struct cdrw_disc *)
void | print_params (write_params_t *)
void | cdrw_init_disc (struct cdrw_disc *)
int | udf_set_version (struct udf_disc *, int)

## Macro Definition Documentation

#define be16_to_cpu | ( |  | x | ) |

Value:
((uint16_t)( \
(((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \
(((uint16_t)(x) & (uint16_t)0xff00U) >> 8) ))

Definition at line 99 of file cdrwtool.h.

#define be32_to_cpu | ( |  | x | ) |

Value:
((uint32_t)( \
(((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
(((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
(((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
(((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) ))

Definition at line 106 of file cdrwtool.h.

#define BLANK_FAST 2

Definition at line 47 of file cdrwtool.h.

#define BLANK_FULL 1

Definition at line 46 of file cdrwtool.h.

#define CDROM_BLOCK 2048

Definition at line 52 of file cdrwtool.h.

#define CDROM_DEVICE "/dev/scd1"

Definition at line 20 of file cdrwtool.h.

#define DEFAULT_SPEED 12

Definition at line 60 of file cdrwtool.h.

#define HZ sysconf(_SC_CLK_TCK)

Definition at line 23 of file cdrwtool.h.

#define NAME_MAX 255

Definition at line 57 of file cdrwtool.h.

#define PACKET_BLOCK 32

Definition at line 53 of file cdrwtool.h.

#define PACKET_SIZE CDROM_BLOCK*PACKET_BLOCK

Definition at line 54 of file cdrwtool.h.

#define PAGE_CHANGE 1

Definition at line 42 of file cdrwtool.h.

#define PAGE_CURRENT 0

Definition at line 41 of file cdrwtool.h.

#define PAGE_DEFAULT 2

Definition at line 43 of file cdrwtool.h.

#define PAGE_SAVE 3

Definition at line 44 of file cdrwtool.h.

#define USE_IMMED 0

Definition at line 39 of file cdrwtool.h.

#define WAIT_BLANK (60 * 60 * HZ)

Definition at line 31 of file cdrwtool.h.

#define WAIT_PC (5 * HZ)

Definition at line 29 of file cdrwtool.h.

#define WAIT_SYNC (25 * HZ)

Definition at line 30 of file cdrwtool.h.

#define WRITE_MODE1 1

Definition at line 49 of file cdrwtool.h.

#define WRITE_MODE2 2 /* mode2, form 1 */

Definition at line 50 of file cdrwtool.h.

## Typedef Documentation

typedef struct disc_capacity disc_capacity_t

typedef struct disc_info disc_info_t

typedef struct opc_table opc_table_t

typedef struct track_info track_info_t

## Function Documentation

int blank_disc | ( | int | ,
|  | int |
| ) |  |

Definition at line 392 of file cdrwtool.c.

void cdrom_close | ( | int |  | ) |

Definition at line 614 of file cdrwtool.c.

int cdrom_open_check | ( | int |  | ) |

Definition at line 623 of file cdrwtool.c.

void cdrw_init_disc | ( | struct cdrw_disc * |  | ) |

Definition at line 769 of file cdrwtool.c.

int close_session | ( | int | ,
|  | unsigned | int
| ) |  |

Definition at line 549 of file cdrwtool.c.

int close_track | ( | int | ,
|  | unsigned | int
| ) |  |

Definition at line 528 of file cdrwtool.c.

void dump_sense | ( | unsigned char * | ,
|  | struct request_sense * |
| ) |  |

Definition at line 59 of file cdrwtool.c.

int format_disc | ( | int | ,
|  | struct cdrw_disc * |
| ) |  |

Definition at line 412 of file cdrwtool.c.

int get_write_mode | ( | int | ,
|  | write_params_t * |
| ) |  |

Definition at line 242 of file cdrwtool.c.

void hexdump | ( | const void * | ,
|  | int |
| ) |  |

Definition at line 49 of file cdrwtool.c.

void make_write_page | ( | write_params_t * | ,
|  | struct cdrw_disc * |
| ) |  |

Definition at line 734 of file cdrwtool.c.

int mode_select | ( | int | ,
|  | unsigned char * | ,
|  | int |
| ) |  |

Definition at line 150 of file cdrwtool.c.

int mode_sense | ( | int | ,
|  | unsigned char * | ,
|  | int | ,
|  | char | ,
|  | int |
| ) |  |

Definition at line 163 of file cdrwtool.c.

int msf_to_lba | ( | int | ,
|  | int | ,
|  | int |
| ) |  |

Definition at line 44 of file cdrwtool.c.

void print_disc_info | ( | disc_info_t * |  | ) |

Definition at line 655 of file cdrwtool.c.

int print_disc_track_info | ( | int |  | ) |

Definition at line 706 of file cdrwtool.c.

void print_params | ( | write_params_t * |  | ) |

Definition at line 759 of file cdrwtool.c.

void print_track_info | ( | track_info_t * |  | ) |

Definition at line 683 of file cdrwtool.c.

int read_buffer_cap | ( | int | ,
|  | struct cdrw_disc * |
| ) |  |

Definition at line 570 of file cdrwtool.c.

int read_disc_info | ( | int | ,
|  | disc_info_t * |
| ) |  |

Definition at line 456 of file cdrwtool.c.

int read_track_info | ( | int | ,
|  | track_info_t * | ,
|  | int |
| ) |  |

Definition at line 486 of file cdrwtool.c.

int reserve_track | ( | int | ,
|  | struct cdrw_disc * |
| ) |  |

Definition at line 507 of file cdrwtool.c.

int set_cd_speed | ( | int | ,
|  | int |
| ) |  |

Definition at line 594 of file cdrwtool.c.

int set_write_mode | ( | int | ,
|  | write_params_t * |
| ) |  |

Definition at line 176 of file cdrwtool.c.

int sync_cache | ( | int |  | ) |

Definition at line 292 of file cdrwtool.c.

int udf_set_version | ( | struct udf_disc * | ,
|  | int |
| ) |  |

Definition at line 152 of file mkudffs.c.

int wait_cmd | ( | int | ,
|  | struct cdrom_generic_command * | ,
|  | unsigned char * | ,
|  | int | ,
|  | int |
| ) |  |

Definition at line 76 of file cdrwtool.c.

int write_blocks | ( | int | ,
|  | unsigned char * | ,
|  | int | ,
|  | int |
| ) |  |

Definition at line 302 of file cdrwtool.c.

int write_file | ( | int | ,
|  | struct cdrw_disc * |
| ) |  |

Definition at line 323 of file cdrwtool.c.