/external/toybox/lib/ |
D | xwrap.c | 64 if (ret == MAP_FAILED) perror_exit("mmap"); in xmmap() 144 if (fflush(stdout) || ferror(stdout)) perror_exit("write"); in xflush() 163 if (out<1) perror_exit("write"); in xputsl() 185 if (EOF == fputc(c, stdout)) perror_exit("write"); in xputc() 195 if (pid == -1) perror_exit("vfork"); in xvforkwrap() 233 if (pipe(cestnepasun+(2*pid))) perror_exit("pipe"); in xpopen_both() 353 if (access(path, flags)) perror_exit("Can't access '%s'", path); in xaccess() 359 if (unlink(path)) perror_exit("unlink '%s'", path); in xunlink() 381 if (pipe(pp)) perror_exit("xpipe"); in xpipe() 386 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() 15 if (-1 == setsockopt(fd, level, opt, val, len)) perror_exit("setsockopt"); in xsetsockopt() 77 if (errno != EINTR && errno != ENOMEM) perror_exit("xpoll"); in xpoll() 142 if (rc != len) perror_exit("sendto"); in xsendto() 159 if (len<0) perror_exit("recvfrom"); in xrecvwait()
|
D | portability.c | 27 if (pid < 0) perror_exit("fork"); in xfork() 39 if (errno!=ENOSYS && !(flags&WARN_ONLY)) perror_exit("getrandom"); in xgetrandom() 133 if (!(fp = setmntent(p, "r"))) perror_exit("bad %s", p); in xgetmountlist()
|
/external/toybox/toys/pending/ |
D | route.c | 91 if (!(host = gethostbyname(ipstr))) perror_exit("resolving '%s'", ipstr); in get_hostname() 142 if (fscanf(fp, "%*[^\n]\n") < 0) perror_exit("fscanf"); //skip 1st line in display_routes() 151 else if (!inet_ntop(AF_INET, &dest, destip, 32)) perror_exit("inet"); in display_routes() 154 else if (!inet_ntop(AF_INET, &gate, gateip, 32)) perror_exit("inet"); in display_routes() 156 if (!inet_ntop(AF_INET, &mask, maskip, 32)) perror_exit("inet"); in display_routes() 166 if (items > 0 && feof(fp)) perror_exit("fscanf %d", items); in display_routes() 219 else perror_exit("gateway '%s' is a NETWORK", argv[1]); in get_next_params() 250 perror_exit("conflicting netmask and host route"); in verify_netmask() 251 if (addr_mask & (addr_mask + 1)) perror_exit("wrong netmask '%s'", netmask); in verify_netmask() 253 if (addr_mask & router_addr) perror_exit("conflicting netmask and route address"); 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 | 205 if (!(pass = getpwuid(n))) perror_exit("Invalid user '%s'", user); in get_uidgid() 213 if (!(grp = getgrgid(n))) perror_exit("Invalid group '%s'",group); in get_uidgid() 241 perror_exit("%s", gai_strerror(ret)); in create_bind_sock() 251 if ((bind(sockfd, rp->ai_addr, rp->ai_addrlen)) < 0) perror_exit("Bind failed"); in create_bind_sock() 293 if (!TT.udp && (listen(fd, TT.bn) < 0)) perror_exit("Listen failed"); in tcpsvd_main() 310 perror_exit("recvfrom"); in tcpsvd_main() 314 if (newfd < 0) perror_exit("Error on accept"); in tcpsvd_main() 390 perror_exit("connect"); in tcpsvd_main()
|
D | wget.c | 156 if (write(sock, toybuf, len) != len) perror_exit("write error"); in wget_main() 159 if ((len = read(sock, toybuf, 4096)) == -1) perror_exit("read error"); in wget_main() 171 if (!(fp = fopen(TT.filename, "w"))) perror_exit("fopen error"); in wget_main() 177 if (fclose(fp) == EOF) perror_exit("fclose error"); in wget_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 | 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 | mdev.c | 245 perror_exit("mknod %s failed", toybuf); in make_device() 249 perror_exit("malloc failed while creating symlink to %s", toybuf); in make_device() 253 perror_exit("symlink creation failed for %s", toybuf); in make_device()
|
/external/toybox/toys/lsb/ |
D | mknod.c | 44 if (type == -1) perror_exit("bad type '%c'", *toys.optargs[1]); in mknod_main() 46 if (toys.optc != 4) perror_exit("need major/minor"); in mknod_main() 54 perror_exit("-Z '%s' failed", TT.Z); in mknod_main()
|
D | hostname.c | 52 perror_exit("set '%s'", hostname); 57 if (gethostname(toybuf, sizeof(toybuf)-1)) perror_exit("gethostname"); 60 if (!(h = gethostbyname(toybuf))) perror_exit("gethostbyname");
|
D | mktemp.c | 44 if (*template == '/' && TT.p && *TT.p) perror_exit("-p + /template"); 51 if (len<3 || strcmp(template+len-3, "XXX")) perror_exit("need XXX"); 79 } else perror_exit("Failed to create %s %s/%s",
|
/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 | 103 if (!s) perror_exit("file"); // already opened, but if deleted since... 104 if (ioctl(lfd, LOOP_SET_FD, ffd)) perror_exit("%s=%s", device, file); 109 if (ioctl(lfd, LOOP_SET_STATUS64, loop)) perror_exit("%s=%s", device, file); 168 if (toys.optc > 1) perror_exit("max 1 arg"); in losetup_main()
|
D | chrt.c | 73 if (-1==(pol = sched_getscheduler(TT.p))) perror_exit("pid %ld", TT.p); in chrt_main() 78 if (sched_getparam(TT.p, (void *)&pri)) perror_exit("sched_getparam"); in chrt_main() 95 perror_exit("sched_setscheduler"); in chrt_main()
|
D | mkpasswd.c | 56 if (dup2(TT.P, 0) == -1) perror_exit("fd"); in mkpasswd_main() 65 perror_exit("password read failed"); in mkpasswd_main()
|
D | nsenter.c | 136 if (unshare(f)) perror_exit(0); in unshare_main() 158 if (setns(fd = xopenro(filename), flags[i])) perror_exit("setns"); in unshare_main()
|
/external/toybox/toys/posix/ |
D | test.c | 104 if (!toys.optargs[pos]) perror_exit("need arg @%d", pos); in test_main() 117 if (++paren>9) perror_exit("bad ("); in test_main() 142 if (paren) perror_exit("need )"); in test_main()
|
D | ulimit.c | 81 if (get && prlimit(TT.P, map[i], 0, &rr)) perror_exit("-%c", flags[i]); in ulimit_main() 116 if (prlimit(TT.P, map[i], &rr, 0)) perror_exit(0); in ulimit_main()
|
D | paste.c | 115 if (!(fps[TT.files++] = (fd ? fdopen(fd, "r") : stdin))) perror_exit(0); in do_paste() 116 if (TT.files >= sizeof(toybuf)/sizeof(FILE *)) perror_exit("tilt"); in do_paste()
|
D | expand.c | 55 perror_exit("stdout"); in do_expand() 65 if (EOF == putc(c, stdout)) perror_exit(0); in do_expand()
|
/external/toybox/toys/net/ |
D | sntp.c | 87 if (FLAG(d) && daemon(0, 0)) perror_exit("daemonize"); in sntp_main() 201 perror_exit("clock_settime"); in sntp_main() 211 if (adjtime(&why, 0)) perror_exit("adjtime"); in sntp_main()
|