Lines Matching +full:1 +full:ma

14  * 1. Redistributions of source code must retain the above copyright
93 while ((n = getopt(argc, argv, "a:bc:thS")) != -1) { in main()
100 errx(1, "%s: %s", optarg, hstrerror(h_errno)); in main()
128 errx(1, "Unknown service name: %s", in main()
136 background = 1; in main()
140 dopty = 1; in main()
144 doserver = 1; in main()
164 err(1, "Could not sigaction(SIGTERM)"); in main()
167 err(1, "Could not sigaction(SIGHUP)"); in main()
170 err(1, "Could not sigaction(SIGINT)"); in main()
176 err(1, "Could not sigaction(SIGCHLD)"); in main()
181 exit(1); in main()
195 struct sockaddr_rfcomm ma; in main() local
205 err(1, "Could not create socket"); in main()
209 memset(&ma, 0, sizeof(ma)); in main()
210 ma.rfcomm_len = sizeof(ma); in main()
211 ma.rfcomm_family = AF_BLUETOOTH; in main()
212 memcpy(&ma.rfcomm_bdaddr, &bt_addr_any, sizeof(bt_addr_any)); in main()
213 ma.rfcomm_channel = channel; in main()
215 if (bind(acceptsock, (struct sockaddr *)&ma, sizeof(ma)) < 0) in main()
216 err(1, "Could not bind socket on channel %d", channel); in main()
218 err(1, "Could not listen on socket"); in main()
220 aaddrlen = sizeof(ma); in main()
221 if (getsockname(acceptsock, (struct sockaddr *)&ma, &aaddrlen) < 0) in main()
222 err(1, "Could not get socket name"); in main()
223 channel = ma.rfcomm_channel; in main()
227 errx(1, "Unable to create local SDP session"); in main()
229 errx(1, "Unable to open local SDP session. %s (%d)", in main()
237 errx(1, "Unable to register LAN service with " in main()
242 s = -1; in main()
248 err(1, "Unable to accept()"); in main()
253 s = -1; in main()
264 errc(1, n, "Could not obtain RFCOMM channel"); in main()
266 errx(1, "Invalid RFCOMM channel number %d", channel); in main()
270 err(1, "Could not create socket"); in main()
277 err(1, "Could not bind socket"); in main()
283 err(1, "Could not connect socket"); in main()
288 err(1, "Could not daemon()"); in main()
302 n = select(max(amaster, s) + 1, &rfd, NULL, NULL, NULL); in main()
309 exit(1); in main()
320 exit(1); in main()
330 exit(1); in main()
339 exit(1); in main()
349 exit(1); in main()
376 if (openpty(amaster, aslave, pty, &tio, NULL) == -1) { in sppd_ttys_open()
378 return (-1); in sppd_ttys_open()
385 return (-1); in sppd_ttys_open()
403 return (-1); in sppd_read()
418 case -1: in sppd_write()
420 return (-1); in sppd_write()