hal: Branch 'master'

Joe Marcus Clarke marcus at kemper.freedesktop.org
Sun Feb 3 10:37:28 PST 2008


 hald/freebsd/probing/freebsd_dvd_rw_utils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 30dea59e09a1c4c20eaeecb9222651f5064accdf
Author: Joe Marcus Clarke <marcus at FreeBSD.org>
Date:   Sun Feb 3 13:37:41 2008 -0500

    don't shrink the cdb size
    
    Protect against cdb size shrinking by conditionally initializing the cdb
    size when the size is greater, or the opcode is being set.

diff --git a/hald/freebsd/probing/freebsd_dvd_rw_utils.c b/hald/freebsd/probing/freebsd_dvd_rw_utils.c
index d602a8e..c004916 100644
--- a/hald/freebsd/probing/freebsd_dvd_rw_utils.c
+++ b/hald/freebsd/probing/freebsd_dvd_rw_utils.c
@@ -52,7 +52,8 @@ static void
 scsi_command_init (ScsiCommand * cmd, size_t i, int arg)
 {
 	cmd->ccb[i] = arg;
-	cmd->len = i + 1;
+	if (i == 0 || i >= cmd->len)
+		cmd->len = i + 1;
 }
 
 static int


More information about the hal-commit mailing list