Lines Matching defs:basedir
652 static int _write_sysfs_int(const char *filename, const char *basedir, int val,
658 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
663 ret = sprintf(temp, "%s/%s", basedir, filename);
711 val, basedir, filename);
724 * @basedir: the sysfs directory in which the file is to be found
729 int write_sysfs_int(const char *filename, const char *basedir, int val)
731 return _write_sysfs_int(filename, basedir, val, 0);
738 * @basedir: the sysfs directory in which the file is to be found
743 int write_sysfs_int_and_verify(const char *filename, const char *basedir,
746 return _write_sysfs_int(filename, basedir, val, 1);
749 static int _write_sysfs_string(const char *filename, const char *basedir,
754 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
761 ret = sprintf(temp, "%s/%s", basedir, filename);
810 basedir, filename);
824 * @basedir: the sysfs directory in which the file is to be found
829 int write_sysfs_string_and_verify(const char *filename, const char *basedir,
832 return _write_sysfs_string(filename, basedir, val, 1);
838 * @basedir: the sysfs directory in which the file is to be found
843 int write_sysfs_string(const char *filename, const char *basedir,
846 return _write_sysfs_string(filename, basedir, val, 0);
852 * @basedir: the sysfs directory in which the file is to be found
857 int read_sysfs_posint(const char *filename, const char *basedir)
861 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
868 ret = sprintf(temp, "%s/%s", basedir, filename);
899 * @basedir: the sysfs directory in which the file is to be found
904 int read_sysfs_float(const char *filename, const char *basedir, float *val)
908 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
915 ret = sprintf(temp, "%s/%s", basedir, filename);
946 * @basedir: the sysfs directory in which the file is to be found
951 int read_sysfs_string(const char *filename, const char *basedir, char *str)
955 char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
962 ret = sprintf(temp, "%s/%s", basedir, filename);