MINIX: Retrieve a file's inode by the filename
<p>In <strong>MINIX 3.2.1</strong>, I want to create a new <strong>system call</strong> which will be given a filename as a parameter and will print the certain file's inode number.</p>

<p>I have created and modified all the needed files to do that.</p>

<p>So in order to retrieve the inode of the file by its name I want to use the default system call:</p>

<pre><code>int stat(char *name, struct stat *buffer)
</code></pre>

<p><a href="http://minix1.woodhull.com/manpages/man2/stat.2.html" rel="nofollow noreferrer">http://minix1.woodhull.com/manpages/man2/stat.2.html</a></p>

<p>in the body of my new system call handler which is</p>

<p><code>int mycall_1(void);</code> inside <code>/usr/src/servers/vfs/misc.c</code></p>

<p>But when I compile and try to test the new system call, at the point where the <code>stat</code> system call should be invoked, it actually won't and instead it's printing the message:</p>

<p><code>sys_call: ipc mask denied SENDREC from 1 to 1</code></p>

<p>So, is is forbidden to use <code>stat</code> inside my new system call?
And if so, is there any other way to retrieve the inode of a file by the filename?</p>

<p>Thanks in advance.</p>