fix endian issue in sysfs.c