Lines Matching refs:verbose
30 static int sysfs_write_attr (char *path, const char *attr, const char *fmt, void *val, int verbose)
63 if (err && verbose) perror(path);
68 static int sysfs_read_attr (char *path, const char *attr, const char *fmt, void *val1, void *val2, int verbose)
83 if (err && verbose) perror(path);
88 static int sysfs_find_dev2 (char *path, dev_t dev, int recurse, int verbose)
96 if (verbose) perror(path);
104 if (sysfs_read_attr(path, "/dev", "%u:%u", &maj, &min, verbose))
109 || (recurse && sysfs_find_dev2(path, dev, recurse - 1, verbose) == 0)) {
117 if (verbose)
122 static int sysfs_find_dev (dev_t dev, char *path, int verbose)
128 if (err && verbose)
134 static int get_dev_from_fd (int fd, dev_t *dev, int verbose)
140 if (verbose) perror(" fstat() failed");
150 static int sysfs_find_fd (int fd, char **path_p, int verbose)
159 err = get_dev_from_fd(fd, &dev, verbose);
166 err = sysfs_find_dev(dev, path, verbose);
176 int sysfs_get_attr (int fd, const char *attr, const char *fmt, void *val1, void *val2, int verbose)
181 err = sysfs_find_fd(fd, &path, verbose);
183 err = sysfs_read_attr(path, attr, fmt, val1, val2, verbose);
187 int sysfs_set_attr (int fd, const char *attr, const char *fmt, void *val_p, int verbose)
192 err = sysfs_find_fd(fd, &path, verbose);
194 err = sysfs_write_attr(path, attr, fmt, val_p, verbose);