HomeSort by relevance Sort by last modified time
    Searched refs:toybuf (Results 1 - 25 of 117) sorted by null

1 2 3 4 5

  /external/toybox/toys/lsb/
hostname.c 28 if (gethostname(toybuf, sizeof(toybuf))) perror_exit("get failed");
29 xputs(toybuf);
pidof.c 31 sprintf(toybuf, "%d", (int)pid);
32 if (comma_scan(TT.omit, toybuf, 0)) return 0;
33 xprintf(" %s"+!!toys.exitval, toybuf);
  /external/toybox/toys/example/
test_human_readable.c 21 human_readable(toybuf, strtoll(*toys.optargs, &c, 0), toys.optflags);
22 printf("%s\n", toybuf);
  /external/toybox/toys/other/
lsusb.c 27 snprintf(toybuf, sizeof(toybuf), "%s/%s", name, "/uevent");
28 file = fopen(toybuf, "r");
32 while (fgets(toybuf, sizeof(toybuf), file))
33 if (sscanf(toybuf, "BUSNUM=%u\n", &busnum)
34 || sscanf(toybuf, "DEVNUM=%u\n", &devnum)
35 || sscanf(toybuf, "PRODUCT=%x/%x/", &pid, &vid)) count++;
pwdx.c 27 num_bytes = readlink(path, toybuf, sizeof(toybuf)-1);
34 path = toybuf;
35 toybuf[num_bytes] = 0;
dos2unix.c 44 len = read(fd, toybuf+(sizeof(toybuf)/2), sizeof(toybuf)/2);
49 char x = toybuf[in+sizeof(toybuf)/2];
53 if (c == 'u' || x != '\n') toybuf[out++] = '\r';
56 } else if (c == 'u' && x == '\n') toybuf[out++] = '\r';
59 else toybuf[out++] = x;
61 xwrite(outfd, toybuf, out);
realpath.c 23 if (!realpath(*s, toybuf)) perror_msg_raw(*s);
24 else xputs(toybuf);
count.c 25 len = xread(0, toybuf, sizeof(toybuf));
28 xwrite(1, toybuf, len);
pmap.c 39 snprintf(toybuf, sizeof(toybuf), "/proc/%u/cmdline", pid);
40 line = readfile(toybuf, 0, 0);
47 sprintf(toybuf, "/proc/%u/%smaps", pid,
49 if (!(fp = fopen(toybuf, "r"))) {
65 &start, &end, toybuf, &off);
69 if (toybuf[3] == 'p') toybuf[3] = '-';
92 xprintf("%s- %s%s", toybuf, line[off]=='[' ? " " : "", name);
102 memset(toybuf, '-', 16)
    [all...]
mkpasswd.c 64 if (read_password(toybuf, sizeof(toybuf), "Password: "))
67 for (i = 0; i<sizeof(toybuf)-1; i++) {
68 if (!xread(0, toybuf+i, 1)) break;
69 if (toybuf[i] == '\n' || toybuf[i] == '\r') break;
71 toybuf[i] = 0;
76 xprintf("%s\n",crypt(*toys.optargs ? *toys.optargs : toybuf, salt));
lsmod.c 25 while (fgets(toybuf, sizeof(toybuf), file)) {
26 char *name = strtok(toybuf, " "), *size = strtok(NULL, " "),
mkswap.c 27 unsigned int pages = (len/pagesize)-1, *swap = (unsigned int *)toybuf;
45 if (TT.L) sprintf(toybuf, ", LABEL=%s", label);
46 else *toybuf = 0;
49 toybuf, show_uuid(uuid));
blkid.c 71 len = readall(fd, toybuf, sizeof(toybuf));
72 if (len != sizeof(toybuf)) return;
79 if (fstypes[i].magic_offset > off+sizeof(toybuf)) {
88 test += ((uint64_t)toybuf[j+fstypes[i].magic_offset-off])<<(8*j);
103 if (toybuf[1116]&4) type = "ext3";
104 if (toybuf[1120]&64) type = "ext4";
120 toybuf+fstypes[i].label_off-off);
130 for (j = 0; j < size; j++) printf("-%02x"+!(bits & (1<<j)), toybuf[uoff+j]);
142 char *name = toybuf, *buffer = toybuf+1024, device[32]
    [all...]
lspci.c 42 char *p = toybuf, *vendor = toybuf+9, *device = toybuf+18,
59 int fd, size = 6 + 2*((toys.optflags & FLAG_e) && p == toybuf);
84 if (!fgets(s, sizeof(toybuf)-(p-toybuf)-1, TT.db)) break;
102 new->name+5, toybuf, vbig ? vbig : "", vendor,
110 : "%s Class %s: %s:%s", new->name+5, toybuf,
base64.c 32 char *buf = toybuf+128;
35 if (!(len = xread(fd, buf, sizeof(toybuf)-128))) {
38 putchar(toybuf[out<<(6-bits)]);
51 if ((x = stridx(toybuf, buf[i])) != -1) {
69 putchar(toybuf[out >> (bits -= 6)]);
85 base64_init(toybuf);
insmod.c 29 strlen(toybuf) + strlen(toys.optargs[i]) + 2 < sizeof(toybuf))
31 strcat(toybuf, toys.optargs[i++]);
32 strcat(toybuf, " ");
37 rc = finit_module(fd, toybuf, 0);
43 rc = init_module(buf, len, toybuf);
  /external/toybox/toys/posix/
strings.c 39 nread = read(fd, toybuf, sizeof(toybuf));
43 if (((toybuf[i] >= 32) && (toybuf[i] <= 126)) || (toybuf[i] == '\t')) {
44 if (count == wlen) fputc(toybuf[i], stdout);
46 string[count++] = toybuf[i];
cpio.c 116 xreadall(afd, toybuf, 110);
117 tofree = name = strpad(afd, x8u(toybuf+94), 110);
127 size = x8u(toybuf+54);
128 mode = x8u(toybuf+14);
129 uid = x8u(toybuf+22);
130 gid = x8u(toybuf+30);
131 timestamp = x8u(toybuf+46); // unsigned 32 bit, so year 2100 problem
162 data = toybuf;
164 if (size < sizeof(toybuf)) data = strpad(afd, size, 0);
165 else xreadall(afd, toybuf, sizeof(toybuf))
    [all...]
kill.c 114 snprintf(toybuf, sizeof(toybuf), "/proc/%d/stat", procpid);
115 if (!readfile(toybuf, toybuf, sizeof(toybuf))) continue;
116 if (sscanf(toybuf, "%*d %*s %*c %*d %*d %d", &procsid) != 1) continue;
120 snprintf(toybuf, sizeof(toybuf), "/proc/%d/cmdline", procpid);
121 if (!readfile(toybuf, toybuf, sizeof(toybuf)) || !*toybuf) continue
    [all...]
cat.c 56 int i, len, size=(toys.optflags & FLAG_u) ? 1 : sizeof(toybuf);
59 len = read(fd, toybuf, size);
67 char c=toybuf[i];
89 } else xwrite(1, toybuf, len);
head.c 31 int i, len, lines=TT.lines, size=sizeof(toybuf);
41 len = read(fd, toybuf, size);
45 for(i=0; i<len;) if (toybuf[i++] == '\n' && !--lines) break;
47 xwrite(1, toybuf, i);
cmp.c 33 int i, len1, len2, min_len, size = sizeof(toybuf)/2;
35 char *buf2 = toybuf+size;
47 len1 = readall(TT.fd, toybuf, size);
52 if (toybuf[i] != buf2[i]) {
55 printf("%ld %o %o\n", byte_no, toybuf[i], buf2[i]);
66 if (toybuf[i] == '\n') line_no++;
  /external/toybox/toys/pending/
crontab.c 125 snprintf(toybuf, sizeof(toybuf), "'%d': premature EOF\n", lno);
145 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line);
156 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line);
162 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line);
170 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line)
    [all...]
bootchartd.c 85 if ((len = readall(fd, toybuf, sizeof(toybuf)-1)) < 0) {
89 toybuf[len] = '\0';
91 fputs(toybuf, fp);
93 if ((ptr = strchr(toybuf, '('))) {
132 sscanf(ptr, "%s", toybuf); // string will come with double quotes.
133 if (!(strncmp(toybuf+1, "on", strlen("on"))) ||
134 !(strncmp(toybuf+1, "yes", strlen("yes")))) TT.proc_accounting = 1;
221 memset(toybuf, 0, sizeof(toybuf));
    [all...]
sulogin.c 55 ret = read_password(toybuf, sizeof(toybuf), s);
58 if ( ret && !toybuf[0]) {
63 pass = crypt(toybuf, pwd);
72 snprintf(toybuf,sizeof(toybuf), "-%s", shell);
73 execl(shell, toybuf, NULL);

Completed in 726 milliseconds

1 2 3 4 5