15a16,22
> /* Zmiany Patryk Czarnik */
> #include <linux/call_dyn.h>
> #ifndef NULL
> #define NULL 0
> #endif
> /* Koniec zmian */
> 
137c144,175
< 	ret = read(file, buf, count, &file->f_pos);
---
> /* Zmiany Patryk Czarnik */
> 	{
> 	    struct marg_t argumenty, wynik;
> 
> 	    argumenty.len = 5;
> 	    if((argumenty.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * argumenty.len, GFP_KERNEL)) == NULL){
> 		 ret = -ENOMEM;
> 		 goto blad;
> 		}
> 	    argumenty.arg[0].data = (void*) file;
> 	    argumenty.arg[1].data = (void*) buf;
> 	    argumenty.arg[2].data = (void*) &count;
> 	    argumenty.arg[3].data = (void*) &file->f_pos;
> 	    argumenty.arg[4].data = (void*) read;
> 	    
> 	    wynik.len = 1;
> 	    if((wynik.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * wynik.len, GFP_KERNEL)) == NULL){
> 		 kfree(argumenty.arg);
> 		 ret = -ENOMEM;
> 		 goto blad;
> 		}
> 	    wynik.arg[0].data = (void*) &ret;
> 	    if (call_dynfun("sec_read", &argumenty, &wynik) != CALL_OK)
> 		ret = read(file, buf, count, &file->f_pos);
> 	    kfree(argumenty.arg);
> 	    kfree(wynik.arg);
> 	}
> blad:
> /* Oryginalnie bylo
>  *	ret = read(file, buf, count, &file->f_pos);
>  */
> /* Koniec zmian */
170c208,239
< 	ret = write(file, buf, count, &file->f_pos);
---
> /* Zmiany Patryk Czarnik */
> 	{
> 	    struct marg_t argumenty, wynik;
> 
> 	    argumenty.len = 5;
> 	    if((argumenty.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * argumenty.len, GFP_KERNEL)) == NULL){
> 		 ret = -ENOMEM;
> 		 goto blad;
> 		}
> 	    argumenty.arg[0].data = (void*) file;
> 	    argumenty.arg[1].data = (void*) buf;
> 	    argumenty.arg[2].data = (void*) &count;
> 	    argumenty.arg[3].data = (void*) &file->f_pos;
> 	    argumenty.arg[4].data = (void*) write;
> 	    
> 	    wynik.len = 1;
> 	    if((wynik.arg = (struct arg_t*)kmalloc(sizeof(struct arg_t) * wynik.len, GFP_KERNEL)) == NULL){
> 	    	 kfree(argumenty.arg);
> 		 ret = -ENOMEM;
> 		 goto blad;
> 		}
> 	    wynik.arg[0].data = (void*) &ret;
> 	    if (call_dynfun("sec_write", &argumenty, &wynik) != CALL_OK)
> 		ret = write(file, buf, count, &file->f_pos);
> 	    kfree(argumenty.arg);
> 	    kfree(wynik.arg);
> 	}
> blad:
> /* Oryginalnie bylo
>  *	ret = write(file, buf, count, &file->f_pos);
>  */
> /* Koniec zmian */
