On 07.02.23 17:06, Joe Perches wrote: > On Mon, 2023-02-06 at 18:27 +0100, Alexandra Winter wrote: >> From: Thorsten Winkler <twinkler@xxxxxxxxxxxxx> ... > > One of the intended uses of sysfs_emit is to not require the > knowlege of buf as PAGE_SIZE so it could possibly be > extended/changed. > > So perhaps the use of entry_len is useless and the PAGE_SIZE use > above should be removed. > Thanks a lot for pointing that out. Will send a v2 tomorrow. > The below though could emit a partial line, dunno if that's a > good thing or not but sysfs is not supposed to emit multiple > lines anyway. Agree, this may not be the best usage of sysfs. But we don't want to change existing behaviour with this patch.