Good evening you all!
I'm doing homework on minix 3.2.1, where i'm asked to create an new system call, my_rmdir, that acts exactly like rmdir but also prints the name of the deleted directory. Also I'm supposed to modify the system's source code so when i give the rmdir command then instead of calling the do_rmdir function the system should call my own do_myrmdir function.
In the past, I have done the same homework with the mkdir command but there everything was simple because mkdir was properly declared minix style and I made changes to
/usr/src/servers/vfs/proto.h
/usr/src/servers/vfs/open.c
/usr/src/servers/vfs/request.c
/usr/src/servers/vfs/table.c
/usr/include/minix/callnr.h
and everything worked allright. But now, I think because of the NETBSD code infusion, I'm a bit lost.
Also the point isn't creating a new system call from scratch because first i don't have the knowledge and second the change i need to make is very small.
The number one problem i have is that i can't find where the original do_rmdir is declared and how it is connected with the rmdir command.
In the /usr/src/servers/vfs/table.c file line 58
do_unlink, /* 40 = rmdir */
makes it more confusing
Any help or ideas?
If you need further information please ask.
I'm new to the forum, i tried to ask properly, thanks for your understanding.