File: sysfs.h

package info (click to toggle)
multipath-tools 0.4.8%2Bgit0.761c66f-10
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,536 kB
  • ctags: 2,590
  • sloc: ansic: 22,254; sh: 549; makefile: 254
file content (26 lines) | stat: -rw-r--r-- 899 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * sysfs.h
 */

#ifndef _LIBMULTIPATH_SYSFS_H
#define _LIBMULTIPATH_SYSFS_H

#ifdef DEBUG
# define dbg(format, args...) condlog(4, format, ##args)
#else
# define dbg(format, args...) do {} while (0)
#endif

int sysfs_init(char *path, size_t len);
void sysfs_cleanup(void);
void sysfs_device_set_values(struct sysfs_device *dev, const char *devpath,
			     const char *subsystem, const char *driver);
struct sysfs_device *sysfs_device_get(const char *devpath);
struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev);
struct sysfs_device *sysfs_device_get_parent_with_subsystem(struct sysfs_device *dev, const char *subsystem);
void sysfs_device_put(struct sysfs_device *dev);
char *sysfs_attr_get_value(const char *devpath, const char *attr_name);
int sysfs_resolve_link(char *path, size_t size);
int sysfs_get_size (struct sysfs_device * dev, unsigned long long * size);

#endif