#ifndef __HURD_CHROOT_H__ #define __HURD_CHROOT_H__ struct netnode { file_t file; /* port on real file */ }; struct chroot_node; error_t chroot_init (void); /* Make a new virtual node. Always consumes the ports. If successful, NP will be locked. */ error_t chroot_new_node (file_t file, size_t size, struct node **np); /* Users must implement this. */ void chroot_node_norefs (struct node *np); /* Return the address of the chroot_node for NODE. NODE must have been allocated using chroot_new_node. */ static inline struct chroot_node * chroot_node (struct node *node) { return (struct chroot_node *) ((char *) netfs_node_netnode (node) + sizeof (struct netnode)); } // XXX pthread_mutex_t idport_ihash_lock; struct hurd_ihash idport_ihash; #endif /* __HURD_CHROOT_H__ */