diff options
author | jdike <jdike> | 2003-01-18 16:25:10 +0000 |
---|---|---|
committer | jdike <jdike> | 2003-01-18 16:25:10 +0000 |
commit | bbcd7bc55bdfcf4f4c346501f48a43e9a751d96e (patch) | |
tree | a5ac94e57f127a07437c7fa7b74427fb94ac65aa | |
parent | dcf78f34d631e065adb5b8d1a3c2fe9d1424c054 (diff) | |
download | uml-history-bbcd7bc55bdfcf4f4c346501f48a43e9a751d96e.tar.gz |
Fixed some 64 bit cleanliness bugs in the mconsole and switch protocols.
-rw-r--r-- | arch/um/drivers/daemon_user.c | 5 | ||||
-rw-r--r-- | arch/um/include/mconsole.h | 23 |
2 files changed, 17 insertions, 11 deletions
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c index ecc56bf..de71aec 100644 --- a/arch/um/drivers/daemon_user.c +++ b/arch/um/drivers/daemon_user.c @@ -7,6 +7,7 @@ #include <errno.h> #include <unistd.h> +#include <stdint.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/time.h> @@ -24,8 +25,8 @@ enum request_type { REQ_NEW_CONTROL }; #define SWITCH_MAGIC 0xfeedface struct request_v3 { - unsigned long magic; - int version; + uint32_t magic; + uint32_t version; enum request_type type; struct sockaddr_un sock; }; diff --git a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h index 8f82ef7..7eea2fa 100644 --- a/arch/um/include/mconsole.h +++ b/arch/um/include/mconsole.h @@ -7,30 +7,35 @@ #ifndef __MCONSOLE_H__ #define __MCONSOLE_H__ +#ifndef __KERNEL__ +#include <stdint.h> +#define u32 uint32_t +#endif + #define MCONSOLE_MAGIC (0xcafebabe) #define MCONSOLE_MAX_DATA (512) #define MCONSOLE_VERSION 2 struct mconsole_request { - unsigned long magic; - int version; - int len; + u32 magic; + u32 version; + u32 len; char data[MCONSOLE_MAX_DATA]; }; struct mconsole_reply { - int err; - int more; - int len; + u32 err; + u32 more; + u32 len; char data[MCONSOLE_MAX_DATA]; }; struct mconsole_notify { - unsigned long magic; - int version; + u32 magic; + u32 version; enum { MCONSOLE_SOCKET, MCONSOLE_PANIC, MCONSOLE_HANG, MCONSOLE_USER_NOTIFY } type; - int len; + u32 len; char data[MCONSOLE_MAX_DATA]; }; |