1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
From 139a6178d536b4aa960ec0e937033b5b100e46ad Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Thu, 6 Nov 2014 13:27:43 +0100
Subject: [PATCH hurd 04/14] boot: drop bootstrap compat code
GNU Mach never sent old-style bootstrap messages. Drop the unused
compatibility code.
* boot/boot.c (request_server): Drop unused code.
(bootstrap_compat): Drop unused function.
---
boot/boot.c | 78 -------------------------------------------------------------
1 file changed, 78 deletions(-)
diff --git a/boot/boot.c b/boot/boot.c
index 03617f5..d5b8096 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -179,21 +179,7 @@ request_server (mach_msg_header_t *inp,
extern int term_server (mach_msg_header_t *, mach_msg_header_t *);
/* extern int tioctl_server (mach_msg_header_t *, mach_msg_header_t *); */
extern int bootstrap_server (mach_msg_header_t *, mach_msg_header_t *);
- extern void bootstrap_compat ();
-#if 0
- if (inp->msgh_local_port == bootport && boot_like_cmudef)
- {
- if (inp->msgh_id == 999999)
- {
- bootstrap_compat (inp, outp);
- return 1;
- }
- else
- return bootstrap_server (inp, outp);
- }
- else
-#endif
return (io_server (inp, outp)
|| device_server (inp, outp)
|| notify_server (inp, outp)
@@ -914,8 +900,6 @@ unlock_readlock ()
/*
* Handle bootstrap requests.
*/
-/* These two functions from .../mk/bootstrap/default_pager.c. */
-
kern_return_t
do_bootstrap_privileged_ports(bootstrap, hostp, devicep)
mach_port_t bootstrap;
@@ -925,68 +909,6 @@ do_bootstrap_privileged_ports(bootstrap, hostp, devicep)
*devicep = pseudo_master_device_port;
return KERN_SUCCESS;
}
-
-void
-bootstrap_compat(in, out)
- mach_msg_header_t *in, *out;
-{
- mig_reply_header_t *reply = (mig_reply_header_t *) out;
- mach_msg_return_t mr;
-
- struct imsg {
- mach_msg_header_t hdr;
- mach_msg_type_t port_desc_1;
- mach_port_t port_1;
- mach_msg_type_t port_desc_2;
- mach_port_t port_2;
- } imsg;
-
- /*
- * Send back the host and device ports.
- */
-
- imsg.hdr.msgh_bits = MACH_MSGH_BITS_COMPLEX |
- MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(in->msgh_bits), 0);
- /* msgh_size doesn't need to be initialized */
- imsg.hdr.msgh_remote_port = in->msgh_remote_port;
- imsg.hdr.msgh_local_port = MACH_PORT_NULL;
- /* msgh_seqno doesn't need to be initialized */
- imsg.hdr.msgh_id = in->msgh_id + 100; /* this is a reply msg */
-
- imsg.port_desc_1.msgt_name = MACH_MSG_TYPE_COPY_SEND;
- imsg.port_desc_1.msgt_size = (sizeof(mach_port_t) * 8);
- imsg.port_desc_1.msgt_number = 1;
- imsg.port_desc_1.msgt_inline = TRUE;
- imsg.port_desc_1.msgt_longform = FALSE;
- imsg.port_desc_1.msgt_deallocate = FALSE;
- imsg.port_desc_1.msgt_unused = 0;
-
- imsg.port_1 = privileged_host_port;
-
- imsg.port_desc_2 = imsg.port_desc_1;
-
- imsg.port_desc_2.msgt_name = MACH_MSG_TYPE_MAKE_SEND;
- imsg.port_2 = pseudo_master_device_port;
-
- /*
- * Send the reply message.
- * (mach_msg_server can not do this, because the reply
- * is not in standard format.)
- */
-
- mr = mach_msg(&imsg.hdr, MACH_SEND_MSG,
- sizeof imsg, 0, MACH_PORT_NULL,
- MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
- if (mr != MACH_MSG_SUCCESS)
- (void) mach_port_deallocate(mach_task_self (),
- imsg.hdr.msgh_remote_port);
-
- /*
- * Tell mach_msg_server to do nothing.
- */
-
- reply->RetCode = MIG_NO_REPLY;
-}
/* Implementation of device interface */
--
2.1.1
|