Lines Matching defs:basedir

648 static int _write_sysfs_int(const char *filename, const char *basedir, int val,
654 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
659 ret = sprintf(temp, "%s/%s", basedir, filename);
707 val, basedir, filename);
720 * @basedir: the sysfs directory in which the file is to be found
725 int write_sysfs_int(const char *filename, const char *basedir, int val)
727 return _write_sysfs_int(filename, basedir, val, 0);
734 * @basedir: the sysfs directory in which the file is to be found
739 int write_sysfs_int_and_verify(const char *filename, const char *basedir,
742 return _write_sysfs_int(filename, basedir, val, 1);
745 static int _write_sysfs_string(const char *filename, const char *basedir,
750 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
757 ret = sprintf(temp, "%s/%s", basedir, filename);
806 basedir, filename);
820 * @basedir: the sysfs directory in which the file is to be found
825 int write_sysfs_string_and_verify(const char *filename, const char *basedir,
828 return _write_sysfs_string(filename, basedir, val, 1);
834 * @basedir: the sysfs directory in which the file is to be found
839 int write_sysfs_string(const char *filename, const char *basedir,
842 return _write_sysfs_string(filename, basedir, val, 0);
848 * @basedir: the sysfs directory in which the file is to be found
853 int read_sysfs_posint(const char *filename, const char *basedir)
857 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
864 ret = sprintf(temp, "%s/%s", basedir, filename);
895 * @basedir: the sysfs directory in which the file is to be found
900 int read_sysfs_float(const char *filename, const char *basedir, float *val)
904 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
911 ret = sprintf(temp, "%s/%s", basedir, filename);
942 * @basedir: the sysfs directory in which the file is to be found
947 int read_sysfs_string(const char *filename, const char *basedir, char *str)
951 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
958 ret = sprintf(temp, "%s/%s", basedir, filename);