/external/toybox/lib/ |
D | xwrap.c | 122 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 …]
|
D | net.c | 7 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/ |
D | route.c | 116 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 …]
|
D | getty.c | 101 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 …]
|
D | traceroute.c | 133 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 …]
|
D | tcpsvd.c | 204 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()
|
D | tftpd.c | 84 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()
|
D | arping.c | 228 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()
|
D | dd.c | 114 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()
|
D | fsck.c | 79 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()
|
D | telnetd.c | 144 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/ |
D | mknod.c | 45 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);
|
D | dmesg.c | 38 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");
|
D | hostname.c | 26 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/ |
D | ionice.c | 69 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()
|
D | losetup.c | 111 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()
|
D | netcat.c | 125 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()
|
D | mkpasswd.c | 56 if (dup2(TT.pfd, 0) == -1) perror_exit("fd"); 65 perror_exit("password read failed");
|
D | nsenter.c | 133 if (unshare(f)) perror_exit(0); in unshare_main() 156 perror_exit("setns"); in unshare_main()
|
D | xxd.c | 63 if (len<0) perror_exit("read"); 89 perror_exit("%s: seek failed", name); in do_xxd_reverse()
|
D | taskset.c | 57 perror_exit(failed, "get", pid); in do_taskset() 87 perror_exit(failed, "set", pid); in do_taskset()
|
D | modinfo.c | 110 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/ |
D | ulimit.c | 79 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()
|
D | cut.c | 252 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()
|
D | expand.c | 55 perror_exit("stdout"); in do_expand() 65 if (EOF == putc(c, stdout)) perror_exit(0); in do_expand()
|