stat.h :
Définition du type de fichier ``lien actif''.
#define S_IFMT 00170000 #define S_IFLNK 0120000 /* symlink */ #ifdef CONFIG_ALINK # define S_IFALNK 0110000 /* alink */ #endif #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #ifdef CONFIG_ALINK # define S_ISALNK(m) (((m) & S_IFMT) == S_IFALNK) #endif
fs.h :
Ajout des nouvelles opérations possibles sur les inodes.
struct inode_operations { int (*symlink) (struct inode *,struct dentry *,const char *); #ifdef CONFIG_ALINK int (*alink) (struct inode *,struct dentry *,const char *); int (*readalink) (struct dentry *, char __user *,int); int (*follow_alink) (struct dentry *dentry, struct nameidata *nd); #endif .... }
Externalisation des prototypes.
#ifdef CONFIG_ALINK extern int vfs_alink(struct inode *, struct dentry *, const char *); extern int vfs_readalink(struct dentry *, char __user *, int, const char *); extern int page_readalink(struct dentry *, char __user *, int); extern int page_follow_alink(struct dentry *, struct nameidata *); extern int page_alink(struct inode *inode, const char *symname, int len); extern struct inode_operations page_alink_inode_operations; #endif
syscall.h :
Définition des prototypes des nouveaux appels systèmes.
asmlinkage long sys_readalink(const char __user *path, char __user *buf, int bufsiz); asmlinkage long sys_alink(const char *old, const char *new); asmlinkage long sys_astat(char __user *filename, struct __old_kernel_stat __user *statbuf);