Implemented drive role 3, sequential write-only stdio drives (e.g. stdout)

This commit is contained in:
2007-09-24 13:54:52 +00:00
parent 83fe9f3621
commit 5e995c9cd0
7 changed files with 149 additions and 54 deletions

View File

@ -332,7 +332,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
libdax_msgs_submit(libdax_messenger,
d->global_index, 0x00020142,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Drive is not grabbed on random access write", 0, 0);
"Drive is not grabbed on random access read", 0, 0);
return 0;
}
if (d->drive_role == 0) {
@ -341,6 +341,12 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Drive is a virtual placeholder (null-drive)", 0, 0);
return 0;
} else if (d->drive_role == 3) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020151,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Read attempt on write-only drive", 0, 0);
return 0;
}
if ((byte_address % alignment) != 0) {
sprintf(msg,