Home
last modified time | relevance | path

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

12345

/third_party/toybox/lib/
Dxwrap.c64 if (ret == MAP_FAILED) perror_exit("mmap"); in xmmap()
165 if (out<1) perror_exit("write"); in xputsl()
187 if (EOF == fputc(c, stdout)) perror_exit("write"); in xputc()
197 if (pid == -1) perror_exit("vfork"); in xvforkwrap()
235 if (pipe(cestnepasun+(2*pid))) perror_exit("pipe"); in xpopen_both()
360 if (access(path, flags)) perror_exit("Can't access '%s'", path); in xaccess()
366 if (unlink(path)) perror_exit("unlink '%s'", path); in xunlink()
388 if (pipe(pp)) perror_exit("xpipe"); in xpipe()
393 if (fd != -1 && close(fd)) perror_exit("xclose"); in xclose()
400 if (fd == -1) perror_exit("xdup"); in xdup()
[all …]
Dnet.c7 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()
72 if (bind(fd, sa, len)) perror_exit("bind"); in xbind()
77 if (connect(fd, sa, len)) perror_exit("connect"); in xconnect()
87 if (errno != EINTR && errno != ENOMEM) perror_exit("xpoll"); in xpoll()
152 if (rc != len) perror_exit("sendto"); in xsendto()
169 if (len<0) perror_exit("recvfrom"); in xrecvwait()
Dportability.c27 if (pid < 0) perror_exit("fork"); in xfork()
39 if (errno!=ENOSYS && !(flags&WARN_ONLY)) perror_exit("getrandom"); in xgetrandom()
63 if ((count = getmntinfo(&entries, 0)) == 0) perror_exit("getmntinfo"); in xgetmountlist()
156 if (!(fp = setmntent(p, "r"))) perror_exit("bad %s", p); in xgetmountlist()
199 if ((not->kq = kqueue()) == -1) perror_exit("kqueue"); in xnotify_init()
246 if ((not->kq = inotify_init()) < 0) perror_exit("inotify_init"); in xnotify_init()
272 if (sizeof(ev)!=read(not->kq, &ev, sizeof(ev))) perror_exit("inotify"); in xnotify_wait()
396 if (fchdir(old_dirfd) == -1) perror_exit("mknodat couldn't return"); in mknodat()
/third_party/toybox/toys/pending/
Dchsh.c48 if (mlock(toybuf, sizeof(toybuf))) perror_exit("mlock");
49 if (!(shadow_info = getspnam(passwd_info->pw_name))) perror_exit("getspnam");
50 if (read_password(toybuf, sizeof(toybuf), "Password: ")) perror_exit("woaj"); //xexit();
51 if (!(encrypted = crypt(toybuf, shadow_info->sp_pwdp))) perror_exit("crypt");
54 if (strcmp(encrypted, shadow_info->sp_pwdp)) perror_exit("Bad password");
74 …if (-1 == update_password("/etc/passwd", user, NULL)) perror_exit("Failed to remove passwd entry");
76 if (putpwent(passwd_info, file)) perror_exit("putwent");
Droute.c90 if (!(host = gethostbyname(ipstr))) perror_exit("resolving '%s'", ipstr); in get_hostname()
141 if (fscanf(fp, "%*[^\n]\n") < 0) perror_exit("fscanf"); //skip 1st line in display_routes()
150 else if (!inet_ntop(AF_INET, &dest, destip, 32)) perror_exit("inet"); in display_routes()
153 else if (!inet_ntop(AF_INET, &gate, gateip, 32)) perror_exit("inet"); in display_routes()
155 if (!inet_ntop(AF_INET, &mask, maskip, 32)) perror_exit("inet"); in display_routes()
165 if (items > 0 && feof(fp)) perror_exit("fscanf %d", items); in display_routes()
218 else perror_exit("gateway '%s' is a NETWORK", argv[1]); in get_next_params()
249 perror_exit("conflicting netmask and host route"); in verify_netmask()
250 if (addr_mask & (addr_mask + 1)) perror_exit("wrong netmask '%s'", netmask); in verify_netmask()
252 if (addr_mask & router_addr) perror_exit("conflicting netmask and route address"); 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()
523 sizeof(two)) < 0) perror_exit("setsockopt RAW_CHECKSUM"); in traceroute_main()
554 perror_exit("LSRR IP_OPTIONS"); in traceroute_main()
559 sizeof(TT.msg_len)) < 0) perror_exit("SO_SNDBUF failed "); in traceroute_main()
564 perror_exit("IP_TOS %ld failed ", TT.tos); in traceroute_main()
[all …]
Dtcpsvd.c205 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()
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()
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()
Dopenvt.c66 perror_exit("can't find open VT"); in openvt_main()
100 perror_exit("%d", vt_num); in deallocvt_main()
Dmdev.c245 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()
Dtelnetd.c118 if (listen(s, 1) < 0) perror_exit("listen"); in listen_socket()
133 if (readall(fd, &ch, 1) <= 0) perror_exit("readall!"); in write_issue()
162 if (TT.fork_pid < 0) perror_exit("fork"); in new_session()
164 if (getpeername(sockfd, (void *)&sa, &sl)) perror_exit("getpeername"); in new_session()
166 perror_exit("getnameinfo"); in new_session()
/third_party/toybox/toys/lsb/
Dmknod.c44 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()
Dmktemp.c50 if (*template == '/' && TT.p && *TT.p) perror_exit("-p + /template"); in mktemp_main()
57 if (len<3 || strcmp(template+len-3, "XXX")) perror_exit("need XXX"); in mktemp_main()
85 } else perror_exit("Failed to create %s %s", in mktemp_main()
Dgzip.c79 if (!(gz = gzdopen(dd ? in_fd : out_fd, b))) perror_exit("gzdopen");
146 if (utimensat(AT_FDCWD, out, times, 0)) perror_exit("utimensat"); in do_gzip()
147 if (chmod(out, sb.st_mode)) perror_exit("chmod"); in do_gzip()
/third_party/toybox/toys/other/
Dionice.c67 if (-1 == ioprio_set() && !(toys.optflags&FLAG_t)) perror_exit("set"); in ionice_main()
80 if (p == -1) perror_exit("read priority"); in iorenice_main()
93 if (-1 == ioprio_set()) perror_exit("set"); in iorenice_main()
Dlosetup.c108 if (!f_path) perror_exit("%s", file); // already opened but if deleted since
112 perror_exit("%s=%s", device, file);
118 if (ioctl(lfd, LOOP_SET_STATUS64, loop)) perror_exit("%s=%s", device, file);
180 if (toys.optc > 1) perror_exit("max 1 arg"); in losetup_main()
Dchrt.c73 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()
Dmkpasswd.c56 if (dup2(TT.P, 0) == -1) perror_exit("fd"); in mkpasswd_main()
65 perror_exit("password read failed"); in mkpasswd_main()
Dnsenter.c136 if (unshare(f)) perror_exit(0); in unshare_main()
158 if (setns(fd = xopenro(filename), flags[i])) perror_exit("setns"); in unshare_main()
/third_party/toybox/toys/posix/
Dtest.c105 if (!toys.optargs[pos]) perror_exit("need arg @%d", pos); in test_main()
118 if (++paren>9) perror_exit("bad ("); in test_main()
143 if (paren) perror_exit("need )"); in test_main()
Dulimit.c81 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()
Dpaste.c115 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()
Dexpand.c55 perror_exit("stdout"); in do_expand()
65 if (EOF == putc(c, stdout)) perror_exit(0); in do_expand()
/third_party/toybox/toys/net/
Dsntp.c87 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()

12345