Blame view
arch/um/drivers/mconsole.h
2.38 KB
dbddf429d um: Add SPDX head... |
1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
1da177e4c Linux-2.6.12-rc2 |
2 3 |
/* * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) |
8ca842c4b uml: remove os_* ... |
4 |
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
1da177e4c Linux-2.6.12-rc2 |
5 6 7 8 |
*/ #ifndef __MCONSOLE_H__ #define __MCONSOLE_H__ |
298e20ba8 um: Stop abusing ... |
9 |
#ifdef __UM_HOST__ |
1da177e4c Linux-2.6.12-rc2 |
10 11 12 |
#include <stdint.h> #define u32 uint32_t #endif |
37185b332 um: get rid of po... |
13 |
#include <sysdep/ptrace.h> |
622e69693 [PATCH] uml: fix ... |
14 |
|
1da177e4c Linux-2.6.12-rc2 |
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
#define MCONSOLE_MAGIC (0xcafebabe) #define MCONSOLE_MAX_DATA (512) #define MCONSOLE_VERSION 2 struct mconsole_request { u32 magic; u32 version; u32 len; char data[MCONSOLE_MAX_DATA]; }; struct mconsole_reply { u32 err; u32 more; u32 len; char data[MCONSOLE_MAX_DATA]; }; struct mconsole_notify { u32 magic; |
7b033e1fd [PATCH] uml: add ... |
35 |
u32 version; |
1da177e4c Linux-2.6.12-rc2 |
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
enum { MCONSOLE_SOCKET, MCONSOLE_PANIC, MCONSOLE_HANG, MCONSOLE_USER_NOTIFY } type; u32 len; char data[MCONSOLE_MAX_DATA]; }; struct mc_request; enum mc_context { MCONSOLE_INTR, MCONSOLE_PROC }; struct mconsole_command { char *command; void (*handler)(struct mc_request *req); enum mc_context context; }; struct mc_request { int len; int as_interrupt; int originating_fd; |
da00d9a54 [PATCH] uml: comp... |
59 |
unsigned int originlen; |
1da177e4c Linux-2.6.12-rc2 |
60 61 62 63 |
unsigned char origin[128]; /* sockaddr_un */ struct mconsole_request request; struct mconsole_command *cmd; |
77bf44003 uml: remove code ... |
64 |
struct uml_pt_regs regs; |
1da177e4c Linux-2.6.12-rc2 |
65 66 67 68 69 |
}; extern char mconsole_socket_name[]; extern int mconsole_unlink_socket(void); |
7b033e1fd [PATCH] uml: add ... |
70 71 72 |
extern int mconsole_reply_len(struct mc_request *req, const char *reply, int len, int err, int more); extern int mconsole_reply(struct mc_request *req, const char *str, int err, |
1da177e4c Linux-2.6.12-rc2 |
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
int more); extern void mconsole_version(struct mc_request *req); extern void mconsole_help(struct mc_request *req); extern void mconsole_halt(struct mc_request *req); extern void mconsole_reboot(struct mc_request *req); extern void mconsole_config(struct mc_request *req); extern void mconsole_remove(struct mc_request *req); extern void mconsole_sysrq(struct mc_request *req); extern void mconsole_cad(struct mc_request *req); extern void mconsole_stop(struct mc_request *req); extern void mconsole_go(struct mc_request *req); extern void mconsole_log(struct mc_request *req); extern void mconsole_proc(struct mc_request *req); |
3eddddcf2 [PATCH] uml: brea... |
87 |
extern void mconsole_stack(struct mc_request *req); |
1da177e4c Linux-2.6.12-rc2 |
88 89 |
extern int mconsole_get_request(int fd, struct mc_request *req); |
7b033e1fd [PATCH] uml: add ... |
90 |
extern int mconsole_notify(char *sock_name, int type, const void *data, |
1da177e4c Linux-2.6.12-rc2 |
91 92 93 94 95 96 |
int len); extern char *mconsole_notify_socket(void); extern void lock_notify(void); extern void unlock_notify(void); #endif |