From mint-bounce@lists.fishpool.fi  Sun Dec  6 12:04:08 2009
Message-ID: <383266.527994664-sendEmail@descaro>
From: "Helmut Karlowski" <helmut.karlowski@ish.de>
To: "mint" <mint@fishpool.com>
Cc: "helmut.karlowski@ish.de" <helmut.karlowski@ish.de>
Subject: [MiNT] KM_FREE
Date: Sun, 6 Dec 2009 16:11:41 +0000
X-Mailer: sendEmail-1.55
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----MIME delimiter for sendEmail-808319.849501462"
X-Antivirus: avast! (VPS 091206-0, 06.12.2009), Outbound message
X-Antivirus-Status: Clean
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: helmut.karlowski@ish.de
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>

This is a multi-part message in MIME format. To properly display this message you need a MIME-Version 1.0 compliant Email program.

------MIME delimiter for sendEmail-808319.849501462
Content-Type: text/plain;
  charset="iso-8859-1"
  Content-Transfer-Encoding: quoted-printable

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.
---------------------------------------------------------




------MIME delimiter for sendEmail-808319.849501462

  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 */
 
 
 /*

------MIME delimiter for sendEmail-808319.849501462--


