Subject: Re: cgd failure since hackathon
To: None <current-users@NetBSD.org>
From: Christian Biere <christianbiere@gmx.de>
List: current-users
Date: 11/30/2006 20:21:09
Quentin Garnier wrote:
> Anyone objects? The size_t -> ssize_t is necessary to avoid
> signed/unsigned mismatch, if we ever want to warn on that (I thought we
> did, though).
Why not the smaller fix?
Index: cgd.c
===================================================================
RCS file: /rep/NetBSD-src/cvs/src/sys/dev/cgd.c,v
retrieving revision 1.41
diff -u -r1.41 cgd.c
--- cgd.c 2006/11/25 21:13:23 1.41
+++ cgd.c 2006/11/30 19:03:33
@@ -542,8 +542,8 @@
if (ret)
goto bail;
- if (ci->ci_blocksize > 4096) {
+ if (ci->ci_blocksize > 4096 && ci->ci_blocksize != (size_t) -1) {
printf("cgd: large blocksize %zu\n", ci->ci_blocksize);
ret = ENOMEM;
goto bail;
}
--
Christian