There has been a trend over the past few years to create more "f" system calls such as fstat, fchmod, ftruncate, etc. which perform operations on an inode that is identified to by an open file descriptor, rather than one that is identified by a path.
I am curious about whether any version of Unix has ever had an "flink" system call, analogous to link(2), except that where link has the following interface:
int link(const char *oldpath, const char *newpath);
this hypothetical flink would have:
int flink(int fd, const char *newpath);
It would behave exactly the same, except that istead of using iname
internally to resolve oldpath
to an inode, it would just use the inode pointed to by the fd
structure.
If this hasn't ever been done, is there something obviously wrong with the idea?