Home
last modified time | relevance | path

Searched refs:perror_exit (Results 1 – 25 of 92) sorted by relevance

1234

/external/toybox/lib/
Dxwrap.c122 if (fflush(stdout) || ferror(stdout)) perror_exit("write"); in xprintf()
127 if (EOF == puts(s) || fflush(stdout) || ferror(stdout)) perror_exit("write"); in xputs()
133 perror_exit("write"); in xputc()
138 if (fflush(stdout) || ferror(stdout)) perror_exit("write");; in xflush()
147 if (pid == -1) perror_exit("vfork"); in xvforkwrap()
184 if (pipe(cestnepasun+(2*pid))) perror_exit("pipe"); in xpopen_both()
290 if (access(path, flags)) perror_exit("Can't access '%s'", path); in xaccess()
296 if (unlink(path)) perror_exit("unlink '%s'", path); in xunlink()
315 if (pipe(pp)) perror_exit("xpipe"); in xpipe()
320 if (close(fd)) perror_exit("xclose"); in xclose()
[all …]
Dnet.c7 if (fd < 0) perror_exit("socket %x %x", type, protocol); in xsocket()
13 if (-1 == setsockopt(fd, level, opt, val, len)) perror_exit("setsockopt"); in xsetsockopt()
38 else if (!ai2->ai_next) perror_exit("connect"); in xconnect()
53 if (errno != EINTR && errno != ENOMEM) perror_exit("xpoll"); in xpoll()
/external/toybox/toys/pending/
Droute.c116 if (fscanf(fp, "%*[^\n]\n") < 0) perror_exit("fscanf"); //skip 1st line in display_routes()
125 else if (!inet_ntop(AF_INET, &dest, destip, 32)) perror_exit("inet"); in display_routes()
128 else if (!inet_ntop(AF_INET, &gate, gateip, 32)) perror_exit("inet"); in display_routes()
130 if (!inet_ntop(AF_INET, &mask, maskip, 32)) perror_exit("inet"); in display_routes()
140 if (items > 0 && feof(fp)) perror_exit("fscanf %d", items); in display_routes()
205 perror_exit("resolving '%s'", *netmask); in get_next_params()
214 } else if (ishost < 0) perror_exit("resolving '%s'", *argv); in get_next_params()
215 else perror_exit("gateway '%s' is a NETWORK", *argv); in get_next_params()
245 perror_exit("conflicting netmask and host route"); in verify_netmask()
246 if (addr_mask & (addr_mask + 1)) perror_exit("wrong netmask '%s'", netmask); in verify_netmask()
[all …]
Dgetty.c101 if (TT.speeds[TT.sc] < 0) perror_exit("bad speed"); in get_speed()
102 if (++TT.sc > 10) perror_exit("too many speeds, max is 10"); in get_speed()
129 perror_exit("setsid"); in open_tty()
136 if (!isatty(0)) perror_exit("/dev/%s: not a tty", TT.tty_name); in open_tty()
142 perror_exit("no read/write permission"); in open_tty()
149 if (tcgetattr(STDIN_FILENO, &TT.termios) < 0) perror_exit("tcgetattr"); in termios_init()
173 perror_exit("tcsetattr"); in termios_init()
187 perror_exit("tcsetattr"); in sense_baud()
200 perror_exit("tcsetattr"); in sense_baud()
231 if (readall(fd, buff, 1) <= 0) perror_exit("readall"); in write_issue()
[all …]
Dtraceroute.c133 if (res < 0) perror_exit("setsockopt ttl %d", ttl); in send_probe4()
138 if (res != len) perror_exit(" sendto"); in send_probe4()
158 perror_exit("sendto"); in send_probe6()
165 &set, sizeof(set)) < 0)) perror_exit("SO_DEBUG failed "); in set_flag_dr()
168 &set, sizeof(set)) < 0)) perror_exit("SO_DONTROUTE failed "); in set_flag_dr()
238 if (errno != EINTR) perror_exit("poll"); in do_trace()
524 sizeof(two)) < 0) perror_exit("setsockopt RAW_CHECKSUM"); in traceroute_main()
555 perror_exit("LSRR IP_OPTIONS"); in traceroute_main()
560 sizeof(TT.msg_len)) < 0) perror_exit("SO_SNDBUF failed "); in traceroute_main()
565 perror_exit("IP_TOS %ld failed ", TT.tos); in traceroute_main()
[all …]
Dtcpsvd.c204 if (!(pass = getpwuid(n))) perror_exit("Invalid user '%s'", user); in get_uidgid()
212 if (!(grp = getgrgid(n))) perror_exit("Invalid group '%s'",group); in get_uidgid()
240 perror_exit("%s", gai_strerror(ret)); in create_bind_sock()
250 if ((bind(sockfd, rp->ai_addr, rp->ai_addrlen)) < 0) perror_exit("Bind failed"); in create_bind_sock()
292 if (!TT.udp && (listen(fd, TT.bn) < 0)) perror_exit("Listen failed"); in tcpsvd_main()
309 perror_exit("recvfrom"); in tcpsvd_main()
313 if (newfd < 0) perror_exit("Error on accept"); in tcpsvd_main()
389 perror_exit("connect"); in tcpsvd_main()
Dtftpd.c84 perror_exit("sendto failed"); in send_errpkt()
161 perror_exit("sendto failed"); in do_action()
254 sizeof(set)) < 0) perror_exit("setsockopt failed"); in tftpd_main()
255 if (bind(TT.sfd, (void *)&srcaddr, socklen)) perror_exit("bind"); in tftpd_main()
257 perror_exit("can't connect to remote host"); in tftpd_main()
Darping.c228 if (!hp) perror_exit("bad address '%s'", *toys.optargs); in arping_main()
232 perror_exit("invalid source address '%s'",TT.src_ip); in arping_main()
240 strlen(TT.iface))) perror_exit("setsockopt"); in arping_main()
247 perror_exit("bind"); in arping_main()
254 perror_exit("cannot connect to remote host"); in arping_main()
264 perror_exit("bind"); in arping_main()
Ddd.c114 perror_exit("invalid number '%s'",arg); in strsuftoll()
152 if ((newfd = fcntl(fd, F_DUPFD, 3) < 0)) perror_exit("dupfd IO"); in xmove_fd()
191 } else perror_exit("%s: read error", in.name); in setup_inout()
210 if (nw <= 0) perror_exit("%s: write error",out.name); in write_out()
278 perror_exit("%s: fsync fail", out.name); in do_dd()
Dfsck.c79 if(errno) perror_exit("Invalid num %s", str); in strtol_range()
81 perror_exit("Not a valid num %s", str); in strtol_range()
83 else perror_exit("Number %s is not in valid [%d-%d] Range", str, min, max); in strtol_range()
266 else perror_exit("option arg Invalid\n"); //paranoid. in wait_for()
380 if (!(fp = setmntent(tmp, "r"))) perror_exit("setmntent failed:"); in fsck_main()
Dtelnetd.c144 perror_exit("setsockopt"); in listen_socket()
149 perror_exit("bind"); in listen_socket()
152 if (listen(s, 1) < 0) perror_exit("listen"); in listen_socket()
167 if (readall(fd, &ch, 1) <= 0) perror_exit("readall!"); in write_issue()
201 if (TT.fork_pid < 0) perror_exit("fork"); in new_session()
/external/toybox/toys/lsb/
Dmknod.c45 if (type == -1) perror_exit("bad type '%c'", *toys.optargs[1]);
47 if (toys.optc != 4) perror_exit("need major/minor");
55 perror_exit("-Z '%s' failed", TT.arg_context);
Ddmesg.c38 if (klogctl(8, NULL, TT.level)) perror_exit("klogctl");
45 if (!size && 1>(size = klogctl(10, 0, 0))) perror_exit("klogctl");;
48 if (size < 0) perror_exit("klogctl");
Dhostname.c26 perror_exit("set failed '%s'", hostname); in hostname_main()
28 if (gethostname(toybuf, sizeof(toybuf))) perror_exit("get failed"); in hostname_main()
/external/toybox/toys/other/
Dionice.c69 if (-1 == ioprio_set() && !(toys.optflags&FLAG_t)) perror_exit("set"); in ionice_main()
82 if (p == -1) perror_exit("read priority"); in iorenice_main()
96 if (-1 == ioprio_set()) perror_exit("set"); in iorenice_main()
Dlosetup.c111 if (!s) perror_exit("file"); // already opened, but if deleted since...
112 if (ioctl(lfd, LOOP_SET_FD, ffd)) perror_exit("%s=%s", device, file);
117 if (ioctl(lfd, LOOP_SET_STATUS64, loop)) perror_exit("%s=%s", device, file);
174 if (toys.optc > 1) perror_exit("max 1 arg"); in losetup_main()
Dnetcat.c125 perror_exit("bind"); in netcat_main()
135 if (temp<0) perror_exit("connect"); in netcat_main()
164 if (pollfds[0].fd<0) perror_exit("accept"); in netcat_main()
206 if (0>poll(pollfds, pollcount, -1)) perror_exit("poll"); in netcat_main()
Dmkpasswd.c56 if (dup2(TT.pfd, 0) == -1) perror_exit("fd");
65 perror_exit("password read failed");
Dnsenter.c133 if (unshare(f)) perror_exit(0); in unshare_main()
156 perror_exit("setns"); in unshare_main()
Dxxd.c63 if (len<0) perror_exit("read");
89 perror_exit("%s: seek failed", name); in do_xxd_reverse()
Dtaskset.c57 perror_exit(failed, "get", pid); in do_taskset()
87 perror_exit(failed, "set", pid); in do_taskset()
Dmodinfo.c110 if (uname(&uts) < 0) perror_exit("bad uname"); in modinfo_main()
114 perror_exit("basedir/kernrelease too long"); in modinfo_main()
/external/toybox/toys/posix/
Dulimit.c79 if (get && prlimit(TT.pid, map[i], 0, &rr)) perror_exit("-%c", flags[i]); in ulimit_main()
114 if (prlimit(TT.pid, map[i], &rr, 0)) perror_exit(0); in ulimit_main()
Dcut.c252 perror_exit("the delimiter must be a single character"); in cut_main()
264 perror_exit("suppressing non-delimited lines operating on fields"); in cut_main()
266 perror_exit("an input delimiter may be specified only when operating on fields"); in cut_main()
Dexpand.c55 perror_exit("stdout"); in do_expand()
65 if (EOF == putc(c, stdout)) perror_exit(0); in do_expand()

1234