While creating the config files for taskclass, instead of using #define
use sizeof so that when the array size changes, things still work as
expected.

Note: Socketclass already follows this model.

Signed-off-by:  Chandra Seetharaman <[EMAIL PROTECTED]>
Signed-off-by:  Gerrit Huizenga <[EMAIL PROTECTED]>

Index: linux-2.6.13-ckrm1/fs/rcfs/tc_magic.c
===================================================================
--- linux-2.6.13-ckrm1.orig/fs/rcfs/tc_magic.c  2005-09-09 17:29:35.000000000 
-0700
+++ linux-2.6.13-ckrm1/fs/rcfs/tc_magic.c       2005-09-09 17:42:58.000000000 
-0700
@@ -34,8 +34,7 @@
 
 #define TC_FILE_MODE (S_IFREG | S_IRUGO | S_IWUSR)
 
-#define NR_TCROOTMF  7
-struct rcfs_magf tc_rootdesc[NR_TCROOTMF] = {
+struct rcfs_magf tc_rootdesc[] = {
        /* First entry must be root */
        {
        /* .name = should not be set, copy from classtype name */
@@ -89,5 +88,5 @@ struct rcfs_magf tc_rootdesc[NR_TCROOTMF
 
 struct rcfs_mfdesc tc_mfdesc = {
        .rootmf = tc_rootdesc,
-       .rootmflen = NR_TCROOTMF,
+       .rootmflen = (sizeof(tc_rootdesc) / sizeof(struct rcfs_magf)),
 };

--


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to