From 0f622def337694d0072587b5f3d7d660859a9a54 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 19 Oct 2010 16:59:34 +0000 Subject: [PATCH] Issueing messages with all cases of burn canceling --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/async.c | 7 ++++++- libburn/libdax_msgs.h | 2 ++ libburn/write.c | 16 ++++++++++------ 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 7b14c9d..56bdd54 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2010.10.15.191717" +#define Cdrskin_timestamP "2010.10.19.165908" diff --git a/libburn/async.c b/libburn/async.c index 60818bf..b47e890 100644 --- a/libburn/async.c +++ b/libburn/async.c @@ -644,8 +644,13 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc) d->cancel = 1; /* ts A70203 : people have been warned in API specs */ - if (opts->write_type == BURN_WRITE_NONE) + if (opts->write_type == BURN_WRITE_NONE) { + libdax_msgs_submit(libdax_messenger, d->global_index, + 0x0002017c, + LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH, + "No valid write type selected", 0, 0); return; + } if (d->drive_role == 0) { libdax_msgs_submit(libdax_messenger, d->global_index, diff --git a/libburn/libdax_msgs.h b/libburn/libdax_msgs.h index 18a5002..71e222d 100644 --- a/libburn/libdax_msgs.h +++ b/libburn/libdax_msgs.h @@ -561,6 +561,8 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff 0x00020179 (FAILURE,HIGH) = Offset source start address is before end of previous source 0x0002017a (FAILURE,HIGH) = Expected offset source object as parameter 0x0002017b (WARNING,HIGH) = Sequential BD-R media likely to soon fail writing + 0x0002017c (FAILURE,HIGH) = No valid write type selected + 0x0002017d (FATAL,HIGH) = Invalid file descriptor with stdio pseudo-drive libdax_audioxtr: 0x00020200 (SORRY,HIGH) = Cannot open audio source file diff --git a/libburn/write.c b/libburn/write.c index f953ac3..8b82f59 100644 --- a/libburn/write.c +++ b/libburn/write.c @@ -2120,9 +2120,11 @@ int burn_stdio_mmc_write(struct burn_drive *d, int start, struct buffer *buf) if (d->cancel) return BE_CANCELLED; if (d->stdio_fd < 0) { - - /* >>> program error */; - + libdax_msgs_submit(libdax_messenger, d->global_index, + 0x0002017d, + LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH, + "Invalid file descriptor with stdio pseudo-drive", + 0, 0); d->cancel = 1; return BE_CANCELLED; } @@ -2170,9 +2172,11 @@ int burn_stdio_mmc_dummy_write(struct burn_drive *d, int start, int burn_stdio_sync_cache(int fd, struct burn_drive *d, int flag) { if (fd < 0) { - - /* >>> program error */; - + libdax_msgs_submit(libdax_messenger, d->global_index, + 0x0002017d, + LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH, + "Invalid file descriptor with stdio pseudo-drive", + 0, 0); d->cancel = 1; return 0; }