19.6 wdir (7477)

This procedure enters a new name into a directory. It is called by “link” (5940) and “maknode” (7467) with a pointer to a (core) “inode” as parameter.

The sixteen characters of the directory entry are copied into the structure “u.u_dent”, and written from there into the directory file. (Note that the previous content of “u.u_dent” will have been the name of the last entry in the directory file.)

The procedure assumes that the directory file has already been searched, that the “inode” for the dlrectory file has already been allocated and that the values of “u.u offset” have been set appropriately.