plan9fox/sys
cinap_lenrek a2ebe5c79a devfs: fix locking and ignore undocumented "fsdev:\n" configuration signature
The confstr was shared between readers so seprintconf() could
write concurrently to that buffer which is not safe.

This replaces the shared static confstr[Maxconf] buffer with a
pointer that is initially nil and a buffer that is alloced on
demand.

The new confstr pointer (and buffer) is now only updated while
wlock()ed from the new setconfstr() function.

This is now done by mconfig() / mdelctl() just before releasing
the wlock.

Now, rdconf() will check if confstr has been initialized, and
test for it again while wlock()ed; making sure the configuration
is read only once.

Also, rdconf() used to check for a undocumented "fsdev:\n" string
at the beginning of config data tho that was never documented.

This changes mconfig() to ignore that particular signature so
the example from the manpage will work as documented.
2021-03-31 17:49:10 +02:00
..
doc /sys/doc: fix mkfile to and remove files that now can be regenerated 2017-05-09 16:23:48 +02:00
games/lib fortunes: That depends on how you define native. -- Andre Garzia 2021-02-09 23:11:08 -05:00
include ape/lib9: expose fd2path (thanks phil9) 2021-02-20 21:02:07 -08:00
lib riostart: revert, this doesnt fix anything 2021-03-07 20:29:55 +01:00
man audio(1): fix little typo. 2021-03-13 09:47:48 +01:00
src devfs: fix locking and ignore undocumented "fsdev:\n" configuration signature 2021-03-31 17:49:10 +02:00