<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">15a16,22
&gt; /* Zmiany Patryk Czarnik */
&gt; #include &lt;linux/call_dyn.h&gt;
&gt; #ifndef NULL
&gt; #define NULL 0
&gt; #endif
&gt; /* Koniec zmian */
&gt; 
137c144,175
&lt; 	ret = read(file, buf, count, &amp;file-&gt;f_pos);
---
&gt; /* Zmiany Patryk Czarnik */
&gt; 	{
&gt; 	    struct marg_t argumenty, wynik;
&gt; 
&gt; 	    argumenty.len = 5;
&gt; 	    if((argumenty.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * argumenty.len, GFP_KERNEL)) == NULL){
&gt; 		 ret = -ENOMEM;
&gt; 		 goto blad;
&gt; 		}
&gt; 	    argumenty.arg[0].data = (void*) file;
&gt; 	    argumenty.arg[1].data = (void*) buf;
&gt; 	    argumenty.arg[2].data = (void*) &amp;count;
&gt; 	    argumenty.arg[3].data = (void*) &amp;file-&gt;f_pos;
&gt; 	    argumenty.arg[4].data = (void*) read;
&gt; 	    
&gt; 	    wynik.len = 1;
&gt; 	    if((wynik.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * wynik.len, GFP_KERNEL)) == NULL){
&gt; 		 kfree(argumenty.arg);
&gt; 		 ret = -ENOMEM;
&gt; 		 goto blad;
&gt; 		}
&gt; 	    wynik.arg[0].data = (void*) &amp;ret;
&gt; 	    if (call_dynfun("sec_read", &amp;argumenty, &amp;wynik) != CALL_OK)
&gt; 		ret = read(file, buf, count, &amp;file-&gt;f_pos);
&gt; 	    kfree(argumenty.arg);
&gt; 	    kfree(wynik.arg);
&gt; 	}
&gt; blad:
&gt; /* Oryginalnie bylo
&gt;  *	ret = read(file, buf, count, &amp;file-&gt;f_pos);
&gt;  */
&gt; /* Koniec zmian */
170c208,239
&lt; 	ret = write(file, buf, count, &amp;file-&gt;f_pos);
---
&gt; /* Zmiany Patryk Czarnik */
&gt; 	{
&gt; 	    struct marg_t argumenty, wynik;
&gt; 
&gt; 	    argumenty.len = 5;
&gt; 	    if((argumenty.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * argumenty.len, GFP_KERNEL)) == NULL){
&gt; 		 ret = -ENOMEM;
&gt; 		 goto blad;
&gt; 		}
&gt; 	    argumenty.arg[0].data = (void*) file;
&gt; 	    argumenty.arg[1].data = (void*) buf;
&gt; 	    argumenty.arg[2].data = (void*) &amp;count;
&gt; 	    argumenty.arg[3].data = (void*) &amp;file-&gt;f_pos;
&gt; 	    argumenty.arg[4].data = (void*) write;
&gt; 	    
&gt; 	    wynik.len = 1;
&gt; 	    if((wynik.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * wynik.len, GFP_KERNEL)) == NULL){
&gt; 	    	 kfree(argumenty.arg);
&gt; 		 ret = -ENOMEM;
&gt; 		 goto blad;
&gt; 		}
&gt; 	    wynik.arg[0].data = (void*) &amp;ret;
&gt; 	    if (call_dynfun("sec_write", &amp;argumenty, &amp;wynik) != CALL_OK)
&gt; 		ret = write(file, buf, count, &amp;file-&gt;f_pos);
&gt; 	    kfree(argumenty.arg);
&gt; 	    kfree(wynik.arg);
&gt; 	}
&gt; blad:
&gt; /* Oryginalnie bylo
&gt;  *	ret = write(file, buf, count, &amp;file-&gt;f_pos);
&gt;  */
&gt; /* Koniec zmian */
</pre></body></html>