/external/toybox/toys/pending/ |
D | telnet.c | 55 if (TT.flags & UF_ECHO) { in set_mode() 56 if (TT.term_mode == CM_TRY) { in set_mode() 57 TT.term_mode = CM_ON; in set_mode() 59 if (TT.term_ok) tcsetattr(0, TCSADRAIN, &TT.raw_term); in set_mode() 62 if (TT.term_mode != CM_OFF) { in set_mode() 63 TT.term_mode = CM_OFF; in set_mode() 65 if (TT.term_ok) tcsetattr(0, TCSADRAIN, &TT.def_term); in set_mode() 73 int wlen = write(TT.sfd, TT.iac, TT.piac); in flush_iac() 76 TT.piac = 0; in flush_iac() 84 if(TT.piac + len >= IACBUFSIZE) flush_iac(); in put_iac() [all …]
|
D | mke2fs.c | 118 uint32_t dblocks = (uint32_t)((size+(TT.blocksize-1))/TT.blocksize); in file_blocks_used() 119 uint32_t idx=TT.blocksize/4, iblocks=0, diblocks=0, tiblocks=0; in file_blocks_used() 175 TT.treeblocks += that->st.st_blocks; in check_treesize() 179 TT.treeblocks += blocks = file_blocks_used(*size, 0); in check_treesize() 180 TT.treeinodes++; in check_treesize() 228 temp = (inodes + TT.groups - 1) / TT.groups; in get_inodespg() 229 inodes = TT.blocksize/sizeof(struct ext2_inode); in get_inodespg() 241 for (temp = 0; temp < 4; temp++) if (TT.blocksize == 1024<<temp) break; in init_superblock() 247 sb->blocks_count = SWAP_LE32(TT.blocks); in init_superblock() 248 sb->free_blocks_count = SWAP_LE32(TT.freeblocks); in init_superblock() [all …]
|
D | dhcp6.c | 181 TT.length += 4; in fill_option() 186 uint8_t *tmp = &mesg.options[TT.length]; in fill_clientID() 195 get_mac(mac, TT.interface_name); in fill_clientID() 203 TT.length += sizeof(DUID); in fill_clientID() 209 uint8_t *tmp = &mesg.options[TT.length]; in fill_optionRequest() 214 TT.length += 4; in fill_optionRequest() 219 uint8_t *tmp = &mesg.options[TT.length]; in fill_elapsedTime() 223 TT.length += 2; in fill_elapsedTime() 229 uint8_t *tmp = &mesg.options[TT.length]; in fill_iaid() 236 TT.length += sizeof(IA_NA); in fill_iaid() [all …]
|
D | getty.c | 98 TT.sc = 0; in get_speed() 100 TT.speeds[TT.sc] = encode(ptr); in get_speed() 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() 111 if (*++toys.optargs) TT.tty_name = xmprintf("%s", *toys.optargs); in parse_arguments() 113 TT.tty_name = xmprintf("%s", *toys.optargs); in parse_arguments() 122 if (strcmp(TT.tty_name, "-")) { in open_tty() 123 if (*(TT.tty_name) != '/') TT.tty_name = xmprintf("/dev/%s", TT.tty_name); in open_tty() 131 xopen(TT.tty_name, O_RDWR|O_NDELAY|O_CLOEXEC); in open_tty() 136 if (!isatty(0)) perror_exit("/dev/%s: not a tty", TT.tty_name); in open_tty() [all …]
|
D | compress.c | 237 int pos = TT.pos++ & 32767; in output_byte() 239 TT.data[pos] = sym; in output_byte() 242 xwrite(TT.outfd, TT.data, 32768); in output_byte() 243 if (TT.crcfunc) TT.crcfunc(TT.data, 32768); in output_byte() 300 TT.crc = ~0; in inflate() 379 lithuff = TT.fixlithuff; in inflate() 380 disthuff = TT.fixdisthuff; in inflate() 395 len = TT.lenbase[sym] + bitbuf_get(bb, TT.lenbits[sym]); in inflate() 397 dist = TT.distbase[sym] + bitbuf_get(bb, TT.distbits[sym]); in inflate() 398 sym = TT.pos & 32767; in inflate() [all …]
|
D | traceroute.c | 114 struct payload_s *send_data4 = (struct payload_s *)(TT.packet); in send_probe4() 115 struct icmp *send_icmp4 = (struct icmp *)(TT.packet); in send_probe4() 119 send_data4->ident = TT.ident; in send_probe4() 120 ((struct sockaddr_in *)&dest)->sin_port = TT.port + seq; in send_probe4() 124 send_icmp4->icmp_id = htons(TT.ident); in send_probe4() 127 send_icmp4->icmp_cksum = in_cksum((uint16_t *) send_icmp4, TT.msg_len); in send_probe4() 132 res = setsockopt(TT.snd_sock, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); in send_probe4() 135 len = TT.msg_len; in send_probe4() 136 res = sendto(TT.snd_sock, out, len, 0, (struct sockaddr *) &dest, in send_probe4() 145 struct payload_s *send_data6 = (struct payload_s *) (TT.packet); in send_probe6() [all …]
|
D | useradd.c | 66 pwd.pw_gecos = TT.gecos ? TT.gecos : "Linux User,"; 67 pwd.pw_dir = TT.dir ? TT.dir : xmprintf("/home/%s", *toys.optargs); 69 if (!TT.shell) { 70 TT.shell = getenv("SHELL"); 72 if (!TT.shell) { 75 if (pw && pw->pw_shell && *pw->pw_shell) TT.shell = xstrdup(pw->pw_shell); 76 else TT.shell = "/bin/sh"; 79 pwd.pw_shell = TT.shell; 82 if (TT.uid > INT_MAX) error_exit("bad uid"); 83 if (getpwuid(TT.uid)) error_exit("uid '%ld' in use", TT.uid); [all …]
|
D | fsck.c | 118 char *p, *s = TT.t_list; in fix_tlist() 126 TT.arr_flag = xzalloc(n + 1); in fix_tlist() 127 TT.arr_type = xzalloc((n + 1) * sizeof(char *)); in fix_tlist() 128 s = TT.t_list; in fix_tlist() 133 TT.arr_flag[n] = no ? FLAG_WITH_NO_PRFX :FLAG_WITHOUT_NO_PRFX; in fix_tlist() 134 TT.negate = no; in fix_tlist() 137 TT.arr_flag[n] = is_no_prefix(&p) ?FLAG_WITH_NO_PRFX :FLAG_WITHOUT_NO_PRFX; in fix_tlist() 138 TT.negate = no; in fix_tlist() 140 if (!n) TT.negate = no; in fix_tlist() 141 if (n && TT.negate != no) error_exit("either all or none of the filesystem" in fix_tlist() [all …]
|
D | arping.c | 86 xprintf("Sent %u probe(s) (%u broadcast(s))\n", TT.sent_nr, TT.brd_sent); in done() 88 TT.rcvd_nr, TT.rcvd_nr == 1 ? "y":"ies", TT.rcvd_req, TT.brd_rcv); in done() 90 if (toys.optflags & FLAG_D) exit(!!TT.rcvd_nr); in done() 93 exit(!TT.rcvd_nr); in done() 118 ret = sendto(TT.sockfd, sbuf, ptr - sbuf, 0, in send_packet() 124 TT.sent_at = tval.tv_sec * 1000000ULL + tval.tv_usec; in send_packet() 125 TT.sent_nr++; in send_packet() 126 if (!TT.unicast_flag) TT.brd_sent++; in send_packet() 162 if (TT.sent_at) { in recv_from() 167 delta = (tval.tv_sec * 1000000ULL + (tval.tv_usec)) - TT.sent_at; in recv_from() [all …]
|
/external/toybox/toys/other/ |
D | hexedit.c | 63 tty_jump(0, TT.height); in draw_tail() 73 yy = (TT.base+yy)*16; in draw_line() 74 if (yy+xx>=TT.len) xx = TT.len-yy; in draw_line() 76 if (yy<TT.len) { in draw_line() 77 printf("\r%0*llX ", TT.numlen, yy); in draw_line() 78 for (x=0; x<xx; x++) printf(" %02X", TT.data[yy+x]); in draw_line() 80 for (x=0; x<xx; x++) draw_char(stdout, TT.data[yy+x]); in draw_line() 91 for (y = 0; y<TT.height; y++) { in draw_page() 101 char cc = TT.data[16*(TT.base+yy)+xx]; in highlight() 105 tty_jump(2+TT.numlen+3*xx, yy); in highlight() [all …]
|
D | timeout.c | 42 fprintf(stderr, "timeout pid %d signal %d\n", TT.pid, TT.nextsig); 43 kill(TT.pid, TT.nextsig); 45 if (TT.k_timeout) { 46 TT.k_timeout = 0; 47 TT.nextsig = SIGKILL; 49 TT.itv.it_value = TT.ktv; 50 setitimer(ITIMER_REAL, &TT.itv, (void *)toybuf); 57 TT.itv.it_value.tv_sec = xparsetime(*toys.optargs, 1000000, &TT.itv.it_value.tv_usec); in timeout_main() 59 if (TT.k_timeout) in timeout_main() 60 TT.ktv.tv_sec = xparsetime(TT.k_timeout, 1000000, &TT.ktv.tv_usec); in timeout_main() [all …]
|
D | truncate.c | 39 if (TT.type == -1) size = TT.size; 42 if (TT.type<2) size += TT.size*(1-(2*TT.type)); 43 else if (TT.type<4) { 44 if ((TT.type==2) ? (size <= TT.size) : (size >= TT.size)) return; 45 size = TT.size; 47 size = (size+(TT.type-4)*(TT.size-1))/TT.size; 48 size *= TT.size; 58 if (-1 != (TT.type = stridx("+-<>/%", *TT.s))) TT.s++; in truncate_main() 59 TT.size = atolx(TT.s); in truncate_main()
|
D | ionice.c | 50 return syscall(__NR_ioprio_get, 1, (int)TT.pid); 55 int prio = ((int)TT.class << 13) | (int)TT.level; in ioprio_set() 57 return syscall(__NR_ioprio_set, 1, (int)TT.pid, prio); in ioprio_set() 62 if (!TT.pid && !toys.optc) error_exit("Need -p or COMMAND"); in ionice_main() 70 if (!TT.pid) xexec(toys.optargs); in ionice_main() 78 TT.pid = atolx(*toys.optargs); in iorenice_main() 83 TT.class = (p>>13)&3; in iorenice_main() 86 TT.pid, classes[TT.class], TT.class, p); in iorenice_main() 90 for (TT.class = 0; TT.class<4; TT.class++) in iorenice_main() 91 if (!strcmp(toys.optargs[toys.optc-1], classes[TT.class])) break; in iorenice_main() [all …]
|
/external/toybox/toys/posix/ |
D | patch.c | 70 if (TT.state>1 && *dlist->data != TT.state) { 71 char *s = dlist->data+(TT.state>3 ? 1 : 0); 72 int i = TT.state == 2 ? 2 : TT.fileout; 79 fprintf(stderr, "DO %d: %s\n", TT.state, dlist->data); 87 if (TT.tempname) replace_tempfile(TT.filein, TT.fileout, &TT.tempname); in finish_oldfile() 88 TT.fileout = TT.filein = -1; in finish_oldfile() 93 if (!TT.current_hunk) return; in fail_hunk() 96 TT.hunknum, TT.oldline, TT.newline); in fail_hunk() 102 TT.state = 2; in fail_hunk() 103 llist_traverse(TT.current_hunk, do_line); in fail_hunk() [all …]
|
D | od.c | 56 char c = TT.buf[(*offset)++]; in od_out_t() 77 memcpy(&fdl, TT.buf+*offset, t->size); in od_out_t() 106 or = TT.buf[(*offset)++]; in od_out_t() 132 if (TT.leftover<16) memset(TT.buf+TT.leftover, 0, 16-TT.leftover); in od_outline() 135 if (!(flags&FLAG_v) && TT.jump_bytes != TT.pos && TT.leftover in od_outline() 136 && !memcmp(TT.bufs, TT.bufs + 2, 16)) in od_outline() 138 if (!TT.star) { in od_outline() 140 TT.star++; in od_outline() 145 TT.star = 0; in od_outline() 148 xprintf(abases[TT.address_idx], (long long)TT.pos); in od_outline() [all …]
|
D | nl.c | 46 int w = TT.w, slen = strlen(TT.s); 51 int match = *TT.b != 'n'; 58 if (*TT.b == 'p') match = !regexec((void *)(toybuf+16), line, 0, 0, 0); 59 if (TT.l || *TT.b == 't') 60 if (*line == '\n') match = TT.l && ++TT.lcount >= TT.l; 62 TT.lcount = 0; 63 printf(toybuf, w, TT.v++, TT.s); 77 if (!TT.s) TT.s = "\t"; in nl_main() 79 if (!TT.n || !strcmp(TT.n, "rn")); // default in nl_main() 80 else if (!strcmp(TT.n, "ln")) clip = "-"; in nl_main() [all …]
|
D | ps.c | 361 {&TT.gg, SLOT_gid}, {&TT.GG, SLOT_rgid}, {&TT.pp, SLOT_pid}, in shared_match_process() 362 {&TT.PP, SLOT_ppid}, {&TT.ss, SLOT_sid}, {&TT.tt, SLOT_ttynr}, in shared_match_process() 363 {&TT.uu, SLOT_uid}, {&TT.UU, SLOT_ruid} in shared_match_process() 394 && TT.tty!=slot[SLOT_ttynr]) return 0; in ps_match_process() 447 int unit = 60, pad = 2, j = TT.ticks; in string_field() 469 sprintf(s, ".%02lld", (100*(ll%TT.ticks))/TT.ticks); in string_field() 475 ll /= TT.si.totalram/((which==PS__VSZ) ? 1024 : 4096); in string_field() 486 if (TT.forcek) sprintf(out, "%lldk", ll/1024); in string_field() 505 time_t t = time(0)-slot[SLOT_uptime]+slot[SLOT_starttime]/TT.ticks; in string_field() 524 int pad, len, width = TT.width; in show_ps() [all …]
|
D | xargs.c | 64 if (TT.delim) { 76 if (TT.max_entries && TT.entries >= TT.max_entries) 83 if (++TT.bytes >= TT.max_bytes && TT.max_bytes) return save; 87 if (TT.eofstr) { 89 if (len == strlen(TT.eofstr) && !strncmp(save, TT.eofstr, len)) 92 if (entry) entry[TT.entries] = save; 93 ++TT.entries; 98 TT.bytes += strlen(data)+1; 99 if (TT.max_bytes && TT.bytes >= TT.max_bytes) return data; 100 if (TT.max_entries && TT.entries >= TT.max_entries) [all …]
|
D | sed.c | 197 if (TT.noeol && !writeall(TT.fdout, "\n", 1)) return 1; in emit() 200 TT.noeol = len && !eol; in emit() 201 l = writeall(TT.fdout, line, len); in emit() 266 if (!TT.lastregex) error_exit("no previous regex"); in get_regex() 267 return TT.lastregex; in get_regex() 270 return TT.lastregex = offset+(char *)trump; in get_regex() 281 char *line = TT.nextline; in walk_pattern() 282 long len = TT.nextlen; in walk_pattern() 289 TT.nextline = 0; in walk_pattern() 290 TT.nextlen = 0; in walk_pattern() [all …]
|
D | chgrp.c | 55 ret = fchownat(fd, node->name, TT.owner, TT.group, in do_chgrp() 62 TT.owner_name ? TT.owner_name : "", in do_chgrp() 63 toys.which->name[2]=='o' && TT.group_name ? ":" : "", in do_chgrp() 64 TT.group_name ? TT.group_name : "", path); in do_chgrp() 66 perror_msg("'%s' to '%s:%s'", path, TT.owner_name, TT.group_name); in do_chgrp() 79 TT.owner = TT.group = -1; in chgrp_main() 88 TT.group_name = grp; in chgrp_main() 90 if (*own) TT.owner = xgetpwnamid(TT.owner_name = own)->pw_uid; in chgrp_main() 91 } else TT.group_name = *toys.optargs; in chgrp_main() 93 if (TT.group_name && *TT.group_name) in chgrp_main() [all …]
|
D | cut.c | 50 head_ref = TT.slist_head; in add_to_list() 67 TT.slist_head = head_ref; in add_to_list() 95 TT.nelem++; in parse_list() 98 if (!TT.nelem) error_exit("missing positions list"); in parse_list() 109 if(!*argv) TT.do_cut(0); //for stdin in get_data() 112 if(strcmp(*argv, "-") == 0) TT.do_cut(0); //for stdin in get_data() 119 TT.do_cut(fd); in get_data() 129 char *buff, *pfield = 0, *delimiter = TT.delim; in do_fcut() 135 struct slist *temp_node = TT.slist_head; in do_fcut() 153 while (cpos < TT.nelem && buff) { in do_fcut() [all …]
|
/external/toybox/generated/ |
D | flags.h | 3054 #ifndef TT 3055 #define TT this.acpi macro 3065 #ifndef TT 3066 #define TT this.arp macro 3081 #ifndef TT 3082 #define TT this.arping macro 3097 #ifndef TT 3098 #define TT this.base64 macro 3106 #ifndef TT 3107 #define TT this.basename macro [all …]
|
/external/toybox/toys/lsb/ |
D | killall.c | 40 if (pid == TT.cur_pid) return 0; 48 kill(pid, TT.signum); 50 if (TT.names[offset] == name) { 51 TT.err[offset] = errno; 58 printf("Killed %s(%d) with signal %d\n", name, pid, TT.signum); 67 TT.names = toys.optargs; in killall_main() 68 TT.signum = SIGTERM; in killall_main() 75 if (TT.sig || (*TT.names && **TT.names == '-')) { in killall_main() 76 if (0 > (TT.signum = sig_to_num(TT.sig ? TT.sig : (*TT.names)+1))) { in killall_main() 80 if (!TT.sig) { in killall_main() [all …]
|
/external/toybox/toys/android/ |
D | getprop.c | 38 if (selabel_lookup(TT.handle, &context, property, 1)) { 46 if (!(TT.size&31)) TT.nv = xrealloc(TT.nv, (TT.size+32)*2*sizeof(char *)); in add_property() 48 TT.nv[2*TT.size] = xstrdup(name); in add_property() 50 TT.nv[1+2*TT.size++] = get_property_context(name); in add_property() 52 TT.nv[1+2*TT.size++] = xstrdup(value); in add_property() 74 TT.handle = selinux_android_prop_context_handle(); in getprop_main() 75 if (!TT.handle) error_exit("unable to get selinux property context handle"); in getprop_main() 92 qsort(TT.nv, TT.size, 2*sizeof(char *), qstrcmp); in getprop_main() 93 for (i = 0; i<TT.size; i++) printf("[%s]: [%s]\n", TT.nv[i*2],TT.nv[1+i*2]); in getprop_main() 95 for (i = 0; i<TT.size; i++) { in getprop_main() [all …]
|
/external/llvm/lib/Target/X86/ |
D | X86TargetMachine.cpp | 44 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) { in createTLOF() argument 45 if (TT.isOSBinFormatMachO()) { in createTLOF() 46 if (TT.getArch() == Triple::x86_64) in createTLOF() 51 if (TT.isOSLinux() || TT.isOSNaCl()) in createTLOF() 53 if (TT.isOSBinFormatELF()) in createTLOF() 55 if (TT.isKnownWindowsMSVCEnvironment() || TT.isWindowsCoreCLREnvironment()) in createTLOF() 57 if (TT.isOSBinFormatCOFF()) in createTLOF() 62 static std::string computeDataLayout(const Triple &TT) { in computeDataLayout() argument 66 Ret += DataLayout::getManglingComponent(TT); in computeDataLayout() 68 if ((TT.isArch64Bit() && in computeDataLayout() [all …]
|