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

[MiNT] nf_ops struct in kentry



Hi everybody,

To the new loadable km modules is passed the new kentry struct instead
of the kerinfo that is exported to the xdd and xfs modules.

I've noticed today that for the Aranym kernel the struct nf_ops that
is part of kentry points to NULL, so it's not possible to use it to
access Aranym's Native Features from km modules.
For kerinfo is OK.

I think there is no reason for this, it's only that it was missed and
nobody need it until now (the only km module i know is xaaes).

If no one knows a reason i've attached a patch to solve this issue.

David Galvez
Index: ./sys/arch/init_mach.c
===================================================================
RCS file: /mint/freemint/sys/arch/init_mach.c,v
retrieving revision 1.20
diff -u -8 -p -r1.20 init_mach.c
--- ./sys/arch/init_mach.c	13 Jan 2010 17:13:49 -0000	1.20
+++ ./sys/arch/init_mach.c	12 Nov 2010 17:27:41 -0000
@@ -40,16 +40,17 @@
 # include "arch/info_mach.h"
 # include "arch/mprot.h"
 # include "arch/tosbind.h"
 
 # include "cookie.h"
 # include "global.h"
 # include "init.h"
 # include "kerinfo.h"
+# include "kentry.h"
 
 
 /*
  * _MCH cookie is not exact anymore
  * (special hades cookie, special ct60 cookie, special aranym cookie)
  *
  * XXX todo: we should replace the global mch variable with a more
  * accurate enum
@@ -160,17 +161,18 @@ _getmch (void)
 					add_info = ct60;
 					break;
 				}
 				
 # ifdef ARANYM
 				case COOKIE_NF:
 				{
 					kernelinfo.nf_ops = nf_init();
-					
+					kentry.vec_mch.nf_ops = nf_init();
+
 					add_info = aranym;
 					break;
 				}
 # endif
 			}
 			
 			jar++;
 		}