Changed arbitrary size of sysattr to PAGESIZE[0]. Not sure about binary sysattrs because they may be > PAGESIZE. Either way, we need dynamic allocation to handle them. Trim only trailing newlines, not the first one. Now content of the sysattr not getting truncated. By the way, do we need to trim carrige return '\r' too? [0] https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt > The buffer will always be PAGE_SIZE bytes in length. On i386, this is 4096. Fixes #25
19 KiB
19 KiB