Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mconsole_kern.c File Reference
#include <linux/console.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/proc_fs.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/utsname.h>
#include <linux/socket.h>
#include <linux/un.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <linux/fs.h>
#include <linux/mount.h>
#include <linux/file.h>
#include <asm/uaccess.h>
#include <asm/switch_to.h>
#include <init.h>
#include <irq_kern.h>
#include <irq_user.h>
#include <kern_util.h>
#include "mconsole.h"
#include "mconsole_kern.h"
#include <os.h>

Go to the source code of this file.

Data Structures

struct  unplugged_pages
 
struct  mconsole_output
 

Macros

#define UML_MCONSOLE_HELPTEXT   "Commands: \n\ version - Get kernel version \n\ help - Print this message \n\ halt - Halt UML \n\ reboot - Reboot UML \n\ config <dev>=<config> - Add a new device to UML; \n\ same syntax as command line \n\ config <dev> - Query the configuration of a device \n\ remove <dev> - Remove a device from UML \n\ sysrq <letter> - Performs the SysRq action controlled by the letter \n\ cad - invoke the Ctrl-Alt-Del handler \n\ stop - pause the UML; it will do nothing until it receives a 'go' \n\ go - continue the UML after a 'stop' \n\ log <string> - make UML enter <string> into the kernel log\n\ proc <file> - returns the contents of the UML's /proc/<file>\n\ stack <pid> - returns the stack of the specified pid\n\"
 
#define UNPLUGGED_PER_PAGE   ((PAGE_SIZE - sizeof(struct list_head)) / sizeof(unsigned long))
 
#define CONFIG_BUF_SIZE   64
 
#define NOTIFY   "notify:"
 

Functions

void mconsole_version (struct mc_request *req)
 
void mconsole_log (struct mc_request *req)
 
void mconsole_proc (struct mc_request *req)
 
void mconsole_help (struct mc_request *req)
 
void mconsole_halt (struct mc_request *req)
 
void mconsole_reboot (struct mc_request *req)
 
void mconsole_cad (struct mc_request *req)
 
void mconsole_go (struct mc_request *req)
 
void mconsole_stop (struct mc_request *req)
 
void mconsole_register_dev (struct mc_device *new)
 
 __initcall (mem_mc_init)
 
void mconsole_config (struct mc_request *req)
 
void mconsole_remove (struct mc_request *req)
 
 late_initcall (mc_add_console)
 
void mconsole_sysrq (struct mc_request *req)
 
void mconsole_stack (struct mc_request *req)
 
 __initcall (mconsole_init)
 
void lock_notify (void)
 
void unlock_notify (void)
 
 __initcall (create_proc_mconsole)
 
 __setup ("mconsole=", mconsole_setup)
 
 __uml_help (mconsole_setup,"mconsole=notify:<socket>\n"" Requests that the mconsole driver send a message to the named Unix\n"" socket containing the name of the mconsole socket. This also serves\n"" to notify outside processes when UML has booted far enough to respond\n"" to mconsole requests.\n\n")
 
 __initcall (add_notifier)
 
charmconsole_notify_socket (void)
 
 EXPORT_SYMBOL (mconsole_notify_socket)
 

Macro Definition Documentation

#define CONFIG_BUF_SIZE   64

Definition at line 425 of file mconsole_kern.c.

#define NOTIFY   "notify:"

Definition at line 806 of file mconsole_kern.c.

#define UML_MCONSOLE_HELPTEXT   "Commands: \n\ version - Get kernel version \n\ help - Print this message \n\ halt - Halt UML \n\ reboot - Reboot UML \n\ config <dev>=<config> - Add a new device to UML; \n\ same syntax as command line \n\ config <dev> - Query the configuration of a device \n\ remove <dev> - Remove a device from UML \n\ sysrq <letter> - Performs the SysRq action controlled by the letter \n\ cad - invoke the Ctrl-Alt-Del handler \n\ stop - pause the UML; it will do nothing until it receives a 'go' \n\ go - continue the UML after a 'stop' \n\ log <string> - make UML enter <string> into the kernel log\n\ proc <file> - returns the contents of the UML's /proc/<file>\n\ stack <pid> - returns the stack of the specified pid\n\"

Definition at line 175 of file mconsole_kern.c.

#define UNPLUGGED_PER_PAGE   ((PAGE_SIZE - sizeof(struct list_head)) / sizeof(unsigned long))

Definition at line 274 of file mconsole_kern.c.

Function Documentation

__initcall ( mem_mc_init  )
__initcall ( mconsole_init  )
__initcall ( create_proc_mconsole  )
__initcall ( add_notifier  )
__setup ( )
__uml_help ( mconsole_setup  )
EXPORT_SYMBOL ( mconsole_notify_socket  )
late_initcall ( mc_add_console  )
void lock_notify ( void  )

Definition at line 794 of file mconsole_kern.c.

void mconsole_cad ( struct mc_request req)

Definition at line 211 of file mconsole_kern.c.

void mconsole_config ( struct mc_request req)

Definition at line 470 of file mconsole_kern.c.

void mconsole_go ( struct mc_request req)

Definition at line 217 of file mconsole_kern.c.

void mconsole_halt ( struct mc_request req)

Definition at line 199 of file mconsole_kern.c.

void mconsole_help ( struct mc_request req)

Definition at line 194 of file mconsole_kern.c.

void mconsole_log ( struct mc_request req)

Definition at line 112 of file mconsole_kern.c.

char* mconsole_notify_socket ( void  )

Definition at line 856 of file mconsole_kern.c.

void mconsole_proc ( struct mc_request req)

Definition at line 124 of file mconsole_kern.c.

void mconsole_reboot ( struct mc_request req)

Definition at line 205 of file mconsole_kern.c.

void mconsole_register_dev ( struct mc_device new)

Definition at line 253 of file mconsole_kern.c.

void mconsole_remove ( struct mc_request req)

Definition at line 496 of file mconsole_kern.c.

void mconsole_stack ( struct mc_request req)

Definition at line 661 of file mconsole_kern.c.

void mconsole_stop ( struct mc_request req)

Definition at line 222 of file mconsole_kern.c.

void mconsole_sysrq ( struct mc_request req)

Definition at line 640 of file mconsole_kern.c.

void mconsole_version ( struct mc_request req)

Definition at line 102 of file mconsole_kern.c.

void unlock_notify ( void  )

Definition at line 799 of file mconsole_kern.c.