From: Laurent Vivier <Laurent.Vivier@bull.net>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 4/5] DVD movie support
Date: Wed, 23 Jan 2008 17:12:54 +0100 [thread overview]
Message-ID: <12011047743807@bull.net> (raw)
In-Reply-To: <1201104774984@bull.net>
This patch allows to read a protected/encrypted movie from a DVD.
(With a Movie Player having the key to decode it, tested with powerDVD)
Laurent
---
hw/scsi-generic.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Index: qemu/hw/scsi-generic.c
===================================================================
--- qemu.orig/hw/scsi-generic.c 2008-01-23 14:03:01.000000000 +0100
+++ qemu/hw/scsi-generic.c 2008-01-23 14:03:02.000000000 +0100
@@ -46,9 +46,12 @@ do { fprintf(stderr, "scsi-generic: " fm
#include <scsi/scsi.h>
#include "block-sg.h"
+#define BLANK 0xa1
+#define SEND_KEY 0xa3
+#define REPORT_KEY 0xa4
#define LOAD_UNLOAD 0xa6
+#define READ_DVD_STRUCTURE 0xad
#define SET_CD_SPEED 0xbb
-#define BLANK 0xa1
#define SCSI_CMD_BUF_SIZE 16
#define SCSI_SENSE_BUF_SIZE 32
@@ -398,6 +401,12 @@ static int scsi_length(uint8_t *cmd, int
case READ_12:
*len *= blocksize;
break;
+ case READ_DVD_STRUCTURE:
+ case SEND_KEY:
+ case REPORT_KEY:
+ *len &= 0xffff;
+ break;
+
}
return 0;
}
@@ -435,6 +444,7 @@ static int is_write(int command)
case MEDIUM_SCAN:
case SEND_VOLUME_TAG:
case WRITE_LONG_2:
+ case SEND_KEY:
return 1;
}
return 0;
next prev parent reply other threads:[~2008-01-23 16:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-23 16:12 [Qemu-devel] [PATCH 0/5] SCSI passthrough cleanup Laurent Vivier
2008-01-23 16:12 ` [Qemu-devel] [PATCH 1/5] reverse scsi-generic Laurent Vivier
2008-01-23 16:12 ` [Qemu-devel] [PATCH 2/5] Move AIO Laurent Vivier
2008-01-23 16:12 ` [Qemu-devel] [PATCH 3/5] Add block SG interface Laurent Vivier
2008-01-23 16:12 ` Laurent Vivier [this message]
2008-01-23 16:12 ` [Qemu-devel] [PATCH 5/5] SCSI device DMA split Laurent Vivier
2008-01-23 20:52 ` [Qemu-devel] [PATCH 0/5] SCSI passthrough cleanup Fabrice Bellard
2008-01-24 8:17 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12011047743807@bull.net \
--to=laurent.vivier@bull.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).