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

1 2 3 4 5

  /external/toybox/toys/example/
demo_human_readable.c 21 human_readable(toybuf, strtoll(*toys.optargs, &c, 0), toys.optflags);
22 printf("%s\n", toybuf);
  /external/toybox/toys/other/
pwdx.c 23 char *path = toybuf;
25 sprintf(toybuf, "/proc/%d/cwd", atoi(*optargs));
26 if (!readlink0(path, toybuf, sizeof(toybuf))) {
lsusb.c 27 sprintf(toybuf, "%s/uevent", name);
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++;
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 65 if (read_password(toybuf, sizeof(toybuf), "Password: "))
68 for (i = 0; i<sizeof(toybuf)-1; i++) {
69 if (!xread(0, toybuf+i, 1)) break;
70 if (toybuf[i] == '\n' || toybuf[i] == '\r') break;
72 toybuf[i] = 0;
77 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";
119 char *s = toybuf+fstypes[i].label_off-off;
137 for (j = 0; j < size; j++) printf("-%02x"+!(bits & (1<<j)), toybuf[uoff+j]);
149 char *name = toybuf, *buffer = toybuf+1024, device[32]
    [all...]
lspci.c 42 char *p = toybuf, *vendor = toybuf+9, *device = toybuf+18,
58 int fd, size = 6 + 2*((toys.optflags & FLAG_e) && p == toybuf);
83 if (!fgets(s, sizeof(toybuf)-(p-toybuf)-1, TT.db)) break;
101 new->name+5, toybuf, vbig ? vbig : "", vendor,
109 : "%s Class %s: %s:%s", new->name+5, toybuf,
base64.c 44 char *buf = toybuf+128;
50 if (!(len = xread(fd, buf, sizeof(toybuf)-128))) {
52 if (bits) wraputchar(toybuf[out<<(6-bits)], &x);
64 if ((x = stridx(toybuf, buf[i])) != -1) {
82 wraputchar(toybuf[out >> (bits -= 6)], &x);
92 base64_init(toybuf);
insmod.c 33 strlen(toybuf) + strlen(toys.optargs[i]) + 2 < sizeof(toybuf))
35 strcat(toybuf, toys.optargs[i++]);
36 strcat(toybuf, " ");
41 rc = finit_module(fd, toybuf, 0);
47 rc = init_module(buf, len, toybuf);
  /external/toybox/toys/lsb/
hostname.c 41 if (gethostname(toybuf, sizeof(toybuf)-1) || !*toybuf)
48 if (gethostname(toybuf, sizeof(toybuf)-1)) perror_exit("gethostname");
49 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/android/
log.c 33 char *s = toybuf;
47 if ((s-toybuf)+strlen(toys.optargs[i])>=1024) {
48 memcpy(s, toys.optargs[i], 1024-(s-toybuf));
49 toybuf[1024] = 0;
57 __android_log_write(pri, TT.tag, toybuf);
  /external/toybox/toys/posix/
cpio.c 117 if (!(size =readall(afd, toybuf, 110))) break;
118 if (size != 110 || memcmp(toybuf, "070701", 6)) error_exit("bad header");
119 tofree = name = strpad(afd, x8u(toybuf+94), 110);
129 size = x8u(toybuf+54);
130 mode = x8u(toybuf+14);
131 uid = x8u(toybuf+22);
132 gid = x8u(toybuf+30);
133 timestamp = x8u(toybuf+46); // unsigned 32 bit, so year 2100 problem
164 data = toybuf;
166 if (size < sizeof(toybuf)) data = strpad(afd, size, 0)
    [all...]
strings.c 54 nread = read(fd, toybuf, sizeof(toybuf));
64 if ((toybuf[i]>=32 && toybuf[i]<=126) || toybuf[i]=='\t') {
65 if (count == wlen) fputc(toybuf[i], stdout);
67 string[count++] = toybuf[i];
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);
cmp.c 33 int i, len1, len2, min_len, size = sizeof(toybuf)/2;
35 char *buf2 = toybuf+size;
49 len1 = readall(TT.fd, toybuf, size);
54 if (toybuf[i] != buf2[i]) {
57 printf("%ld %o %o\n", byte_no, toybuf[i], buf2[i]);
66 if (toybuf[i] == '\n') line_no++;
  /external/toybox/toys/pending/
crontab.c 126 snprintf(toybuf, sizeof(toybuf), "'%d': premature EOF\n", lno);
146 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line);
157 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line);
163 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line);
171 snprintf(toybuf, sizeof(toybuf), "'%d': %s\n", lno, line)
    [all...]
wget.c 111 strcat(toybuf, name);
112 strcat(toybuf, ": ");
113 strcat(toybuf, value);
114 strcat(toybuf, "\r\n");
122 if (!strncmp(toybuf+i, "\r\n\r\n", 4)) break;
125 return toybuf+i+4;
146 sprintf(toybuf, "GET %s HTTP/1.1\r\n", path);
152 strcat(toybuf, "\r\n");
155 len = strlen(toybuf);
156 if (write(sock, toybuf, len) != len) perror_exit("write error")
    [all...]
bootchartd.c 86 if ((len = readall(fd, toybuf, sizeof(toybuf)-1)) < 0) {
90 toybuf[len] = '\0';
92 fputs(toybuf, fp);
94 if ((ptr = strchr(toybuf, '('))) {
133 sscanf(ptr, "%s", toybuf); // string will come with double quotes.
134 if (!(strncmp(toybuf+1, "on", strlen("on"))) ||
135 !(strncmp(toybuf+1, "yes", strlen("yes")))) TT.proc_accounting = 1;
222 memset(toybuf, 0, sizeof(toybuf));
    [all...]

Completed in 129 milliseconds

1 2 3 4 5