On 23 April 2012 02:08, Stas Sergeev <s...@list.ru> wrote: > The split was intentional and discussed: alloc_mapping() was > supposed to do before dropping privs and closing mem_fd. > Basically you want to restore the code to the 7 years old state. > > Yes, but you add the subtle requirement to run the _first_ > mmap_mapping_kmem() > before the root drop. This will work perhaps, but what's the use? > Maybe simply unpairing the calls to have mmap_mapping_kmem() > at a later stages than now?
I see what you mean; however, alloc_mapping is always immediately followed by mmap_mapping for a good reason: there is no reason to delay the mmap into DOS space until the priv drop. What we needed was simply a way to map and unmap video ram using mremap when switching consoles, without having root, and without having mem_fd open. So it's actually simpler to just map straight into DOS space before the priv drop. Then the old alloc_mapping()/mmap_mapping() sequence becomes a straight mmap_mapping() (because that's what it does, call mmap() on /dev/mem), and the mmap_mapping() after priv_drop could be renamed a new function, perhaps mremap_mapping(), that calls mremap(). I'm sure that simplifies the code significantly without changing the actual functionality. > Btw, you don't need to write the logs like > > Remove unused MAPPING_SHM and .mmap method from mapping code (Stas Sergeev). > > > any more because "git am" is cool. :) I know :) I'm just still finding out about setting up some parts of git; for now it's still mirroring svn. When everything is in place (email notifications, documentation), that can stop. Bart ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Dosemu-devel mailing list Dosemu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dosemu-devel