[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] DVD movie support
From: |
Laurent Vivier |
Subject: |
[Qemu-devel] [PATCH 4/5] DVD movie support |
Date: |
Wed, 23 Jan 2008 17:12:54 +0100 |
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;
Re: [Qemu-devel] [PATCH 0/5] SCSI passthrough cleanup, Fabrice Bellard, 2008/01/23