Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi Fix size reporting for DVD+R/DL and BluRay's; ...



details:   https://anonhg.NetBSD.org/src/rev/3c69e4887693
branches:  trunk
changeset: 765151:3c69e4887693
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri May 20 09:23:37 2011 +0000

description:
Fix size reporting for DVD+R/DL and BluRay's; the value was trunced due to a
32 bit trunc due to a lacking type cast. The number of sectors for such media
can be more than 1<<32-1.

diffstat:

 sys/dev/scsipi/cd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 0441accec787 -r 3c69e4887693 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Fri May 20 09:06:02 2011 +0000
+++ b/sys/dev/scsipi/cd.c       Fri May 20 09:23:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.302 2010/04/04 21:36:22 martin Exp $  */
+/*     $NetBSD: cd.c,v 1.303 2011/05/20 09:23:37 reinoud Exp $ */
 
 /*-
  * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.302 2010/04/04 21:36:22 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.303 2011/05/20 09:23:37 reinoud Exp $");
 
 #include "rnd.h"
 
@@ -1850,7 +1850,7 @@
 
                        /* overwrite only with a sane value */
                        if (track_start + track_size >= 100)
-                               *size = track_start + track_size;
+                               *size = (u_long) track_start + track_size;
                }
        }
 



Home | Main Index | Thread Index | Old Index