Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
symlink.c File Reference
#include <linux/fs.h>
#include <linux/gfp.h>
#include <linux/mount.h>
#include <linux/module.h>
#include <linux/kobject.h>
#include <linux/namei.h>
#include <linux/mutex.h>
#include <linux/security.h>
#include "sysfs.h"

Go to the source code of this file.

Functions

: name of the symlink.

sysfs_create_link_nowarn - create symlink between two objects. : object whose directory we're creating the link in. : object we're pointing to.

This function does the same as sysfs_create_link(), but it doesn't warn if the link already exists.

int sysfs_create_link (struct kobject *kobj, struct kobject *target, const char *name)
 
int sysfs_create_link_nowarn (struct kobject *kobj, struct kobject *target, const char *name)
 

: name of the symlink to remove.

sysfs_remove_link - remove symlink in object's directory. : object we're acting for.

struct inode_operations sysfs_symlink_inode_operations
 
void sysfs_delete_link (struct kobject *kobj, struct kobject *targ, const char *name)
 
void sysfs_remove_link (struct kobject *kobj, const char *name)
 
int sysfs_rename_link (struct kobject *kobj, struct kobject *targ, const char *old, const char *new)
 
 EXPORT_SYMBOL_GPL (sysfs_create_link)
 
 EXPORT_SYMBOL_GPL (sysfs_remove_link)
 
 EXPORT_SYMBOL_GPL (sysfs_rename_link)
 

Function Documentation

EXPORT_SYMBOL_GPL ( sysfs_create_link  )
EXPORT_SYMBOL_GPL ( sysfs_remove_link  )
EXPORT_SYMBOL_GPL ( sysfs_rename_link  )
int sysfs_create_link ( struct kobject kobj,
struct kobject target,
const char name 
)

Definition at line 104 of file symlink.c.

int sysfs_create_link_nowarn ( struct kobject kobj,
struct kobject target,
const char name 
)

Definition at line 119 of file symlink.c.

void sysfs_delete_link ( struct kobject kobj,
struct kobject targ,
const char name 
)

Definition at line 134 of file symlink.c.

void sysfs_remove_link ( struct kobject kobj,
const char name 
)

Definition at line 151 of file symlink.c.

int sysfs_rename_link ( struct kobject kobj,
struct kobject targ,
const char old,
const char new 
)

sysfs_rename_link - rename symlink in object's directory. : object we're acting for. : object we're pointing to. : previous name of the symlink. : new name of the symlink.

A helper function for the common rename symlink idiom.

Definition at line 172 of file symlink.c.

Variable Documentation

struct inode_operations sysfs_symlink_inode_operations
Initial value:
= {
.setxattr = sysfs_setxattr,
.readlink = generic_readlink,
.follow_link = sysfs_follow_link,
.put_link = sysfs_put_link,
.setattr = sysfs_setattr,
.getattr = sysfs_getattr,
.permission = sysfs_permission,
}

Definition at line 294 of file symlink.c.