sysfs.h 916 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * fs/sysfs/sysfs.h - sysfs internal header file
  3. *
  4. * Copyright (c) 2001-3 Patrick Mochel
  5. * Copyright (c) 2007 SUSE Linux Products GmbH
  6. * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
  7. *
  8. * This file is released under the GPLv2.
  9. */
  10. #ifndef __SYSFS_INTERNAL_H
  11. #define __SYSFS_INTERNAL_H
  12. #include <linux/sysfs.h>
  13. /*
  14. * mount.c
  15. */
  16. extern struct kernfs_node *sysfs_root_kn;
  17. /*
  18. * dir.c
  19. */
  20. extern spinlock_t sysfs_symlink_target_lock;
  21. void sysfs_warn_dup(struct kernfs_node *parent, const char *name);
  22. /*
  23. * file.c
  24. */
  25. int sysfs_add_file(struct kernfs_node *parent,
  26. const struct attribute *attr, bool is_bin);
  27. int sysfs_add_file_mode_ns(struct kernfs_node *parent,
  28. const struct attribute *attr, bool is_bin,
  29. umode_t amode, const void *ns);
  30. /*
  31. * symlink.c
  32. */
  33. int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target,
  34. const char *name);
  35. #endif /* __SYSFS_INTERNAL_H */