|
From: Eric P. <ep...@pa...> - 2010-04-17 23:40:07
|
On Sat, Apr 17, 2010 at 12:22 PM, Eric Paris <ep...@pa...> wrote: > You get the same behaviour with your loaded rules if you load them the > 'right' way (which is non-obvious, IMHO) You need to > > open(sysfs file) > write(rule one) > write(rule two) > write(rule three) > write(rule four) > close(sysfs_file) > > I'm guessing you used cat file > sysfs_file which resulted in > > open(sysfs_file) > write(rule one rule two rule th); > write(ree rule four) > close(sysfs_file) > > Which resulted in the crap behaviour you got. I suggested to Mimi off > list that maybe the best solution would be to change the parser a > little such that we stop parsing on \n on return a short write equal > to the length of the one rule we parsed. Thus the way cat handles > things we would get: I was thinking something like the attached patch..... -Eric |