[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] KM_FREE
Hello
I've added the possibility to free a kernel-module to MiNT. Drawback is
that the caller only has path/name it passed to identify the module, and
MiNT may use another spelling for it. It would be better to have a uniqe
id to pass to the kernel for KM_FREE.
---------------------------------------------------------
add the possibility to free a kernel-module to MiNT.
---------------------------------------------------------
name="KM_FREE.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="KM_FREE.patch"
--- orig/module.c 2009-04-26 12:59:27.406250000 +0200
+++ module.c 2009-11-07 12:06:00.656250000 +0100
@@ -819,6 +819,26 @@
r = run_km(buf);
break;
}
+ case KM_FREE:
+ {
+ struct kernel_module *km;
+
+ for( km = loaded_modules; km; km = km->next )
+ {
+ DEBUG(("module_ioctl: free_km: looking(%s)",km->name));
+ if( !strcmp( buf, km->name ) )
+ {
+ DEBUG(("module_ioctl: free_km(%s)",km->name));
+ free_km( km );
+ r = 0;
+ break;
+ }
+ if( !km )
+ DEBUG(("module_ioctl: free_km(%s) not found",buf));
+ }
+ break;
+ }
+
}
DEBUG (("module_ioctl: return %li", r));
--- orig/mint/ioctl.h 2006-11-14 13:54:20.000000000 +0100
+++ mint/ioctl.h 2009-11-07 11:03:26.687500000 +0100
@@ -104,6 +104,7 @@
*/
# define KM_RUN (('K'<< 8) | 1) /* 1.16 */
+# define KM_FREE (('K'<< 8) | 2) /* 1.17.1 */
/*