diff options
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -12,7 +12,7 @@ extern struct s_config config; int sysfs_read_str(char *sysfs_file,char *buf,size_t bufsize) { int sysfs_handle; - size_t datalen; + ssize_t datalen; DEBUG1_SYSFS("Reading sysfs file %s\n",sysfs_file); @@ -35,7 +35,7 @@ int sysfs_read_str(char *sysfs_file,char *buf,size_t bufsize) buf[datalen]=0; } - return datalen; + return (int) datalen; } long int sysfs_read_long_int(char *sysfs_file) @@ -54,7 +54,7 @@ long int sysfs_read_long_int(char *sysfs_file) int sysfs_write_str(char *sysfs_file,char *value,long int checkdelay) { int sysfs_handle; - size_t len; + ssize_t len; char buf[255]; DEBUG1_SYSFS("Writing %s to sysfs file %s\n",value,sysfs_file); @@ -75,7 +75,7 @@ int sysfs_write_str(char *sysfs_file,char *value,long int checkdelay) DEBUG2_SYSFS("Written %zd bytes\n",len); // Wait if instructed to - if (checkdelay>0) usleep(checkdelay); + if (checkdelay>0) usleep((unsigned int) checkdelay); // Validate we actually set what we want to set sysfs_read_str(sysfs_file,buf,sizeof(buf)); |