Hello, Marin Ramesa. 2013/7/27 Marin Ramesa <[email protected]>
> On 18.07.2013 09:25:23, Vojtech Horky wrote: > > Just a sidenote: if you are more interested in the "microkernel > > programming", there are also tickets that are for kernel - such as > > #91 or #466 - but they do not target the more complex parts > > (e.g. memory or thread management). > > I've tried something with #91. But in the end I'm not sure if I done it > correctly. Maybe there are too much additions to existing code. > For example, I added a character buffer to outdev and wrote an > outdev_push_character() routine for it, I don't know if this was a good > idea. I added a new command 'pager' to console. Modifed stdout_write() > to use the new buffer if the buffering is on and there is an existing > console command that requested the use of the buffer, with this patch > there is one if statement more in stdout_write(), it still passes the > kernel printf string test. > > <snip> > > Anyway, as far as I tested, the pager is working. To use it enter > 'pager' in kconsole, or 'pager -p' for prompt mode. Output of the next > command will get buffered and paged. In ordinary mode ENTER is to > scroll one line down and SPACE is to view the next page. In prompt > mode, UP and DOWN are for moving inside the buffer and Q is to quit the > pager prompt mode. > Thanks for the patch. I like the extension with the scrolling but I also have some remarks. The code formatting looks okay to me, except we do not start "else" on a separate line. The patch does not compile on all architectures (you can use ./tools/check.sh to compile HelenOS for all supported targets) - it seems to me that the percentage computation in the scroll mode is at fault. We do not have floating point numbers in kernel. I was not able to use the pager for some commands. For example, running pager followed by test slab2 would not invoke the pager correctly (in QEMU on ia32). Maybe your approach is too complex because you try to solve more problems all at once. For example, the up/down scrolling is a very nice feature but for the kernel console, the paging alone could be enough. Especially if it works for any command issued. Cheers, - Vojta > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/listinfo/helenos-devel > >
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
