[Lguest] [PATCH] Launcher remote-control port (LCA tutorial)

Robert Norris rob at cataclysm.cx
Fri Feb 1 09:21:42 EST 2008


Hi list,

Attached is a patch that I developed in Rusty's lguest hacking session
at LCA. It adds a remote control port to the launcher. There's plenty
wrong with this patch but I'm not going to have time to clean it up
anytime soon and I figured it was better to offer it to you for
inspiration or amusement rather than leave it forgotten on my laptop.

Things that need doing:

 - If the control FIFO gets closed, reopen it so we can accept more
   commands from it. This would allow "echo command > control.fifo".

 - Make the command "parser" (such that it is) smarter and probably give
   it a table of command handler functions, otherwise the code is going
   to get really messy really fast.

 - To implement the "status" command I needed to get at the device list.
   The fastest way to do that was to make it global. All the code that
   currently passes a pointer to the list around should be pruned to use
   the global list. Alternatively, remove the global and find another
   way to let the control handler get the list (perhaps making devices
   point back to their list). Ultimately its a design question that I
   can't answer.

I'm not currently subscribed to this list. I may subscribe later if I
find time to hack on lguest a bit more. I do have some ideas :)

Cheers,
Rob.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lguest.diff
Type: text/x-diff
Size: 6760 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/lguest/attachments/20080201/91e50818/attachment.diff>


More information about the Lguest mailing list