Searched defs:str (Results 1 - 25 of 36) sorted by relevance

12

/system/core/run-as/
H A Drun-as.c83 const char* str = "Usage: " PROGNAME " <package-name> <command> [<args>]\n\n"; local
84 write(1, str, strlen(str));
/system/core/libsync/
H A Dsync_test.c81 char str[256]; local
94 sprintf(str, "test_fence%d-%d", i, j);
95 int fd = sw_sync_fence_create(sync_timeline_fd, str, val);
108 sprintf(str, "merged_fence%d", j);
109 sync_data[3].fd[j] = sync_merge(str, sync_data[0].fd[j], sync_data[1].fd[j]);
124 fgets(str, sizeof(str), stdin);
133 fgets(str, sizeof(str), stdin);
138 fgets(str, sizeo
[all...]
/system/core/adb/
H A Dremount_service.c92 static void write_string(int fd, const char* str) argument
94 writex(fd, str, strlen(str));
H A Dsockets.c611 #define PREFIX(str) { str, sizeof(str) - 1 }
613 const char *str; member in struct:prefix_struct
632 if (!strncmp(service, prefixes[i].str, prefixes[i].len))
/system/core/libcutils/
H A Dzygote.c39 static void replace_nl(char *str);
257 static void replace_nl(char *str) argument
259 for(; *str; str++) {
260 if (*str == '\n') {
261 *str = ' ';
H A Dstr_parms.c44 static int str_hash_fn(void *str) argument
49 for (p = str; p && *p; p++)
131 char *str; local
140 str = strdup(_string);
141 if (!str)
146 kvpair = strtok_r(str, ";", &tmpstr);
182 free(str);
312 char *str = NULL; local
315 hashmapForEach(str_parms->map, combine_strings, &str);
317 str
333 test_str_parms_str(const char *str) argument
[all...]
/system/core/toolbox/
H A Ddynarray.c69 void strlist_append_b( strlist_t *list, const void* str, size_t slen ) argument
72 memcpy(copy, str, slen);
77 void strlist_append_dup( strlist_t *list, const char *str) argument
79 strlist_append_b(list, str, strlen(str));
H A Dlsusb.c30 char *str = usb_device_get_string(dev, id); local
32 if (id && str) {
33 strlcpy(str_buff, str, sizeof(str_buff));
34 free(str);
H A Dmount.c22 const char str[8]; member in struct:mount_opts
29 char *str; member in struct:extra_opts
70 if (extra->str)
76 new = realloc(extra->str, newlen + 1); /* +1 for NUL */
80 extra->str = new;
81 extra->end = extra->str + extra->used_size;
120 res = strcmp(s, options[i].str);
335 return do_mount(dev, dir, type, rwflag, extra.str, loop, loopdev);
/system/core/toolbox/grep/
H A Dfastgrep.c326 grep_revstr(unsigned char *str, int len) argument
332 c = str[i];
333 str[i] = str[len - i - 1];
334 str[len - i - 1] = c;
H A Dgrep.h93 struct str { struct
150 char *grep_strdup(const char *str);
151 void printline(struct str *line, int sep, regmatch_t *matches, int m);
154 void enqueue(struct str *x);
H A Dutil.c61 static int procline(struct str *l, int);
191 struct str ln;
286 procline(struct str *l, int nottext)
430 grep_strdup(const char *str) argument
434 if ((ret = strdup(str)) == NULL)
443 printline(struct str *line, int sep, regmatch_t *matches, int m)
/system/extras/tests/memtest/
H A Dfptest.cpp51 static void endTime(const char *str, double ops) argument
55 printf("Test: %s, %f Mops\n", str, ops / ds / 1e6);
H A Dmemtest.cpp528 char* str = (char*)calloc(MAX_SIZE+4+8, 1); local
556 memset(str, 'A', size-1);
557 if (j==0) preload(str, DCACHE_SIZE*4); // flush D
558 else preload(str, size); // load D
564 c = strlen(str);
583 free(str);
/system/extras/tests/sdcard/
H A Dstopwatch.cpp36 #define SNPRINTF_OR_RETURN(str, size, format, ...) { \
37 int len = snprintf((str), (size), (format), ## __VA_ARGS__); \
43 (size) -= len; (str) += len; \
106 void StopWatch::sprint(char **str, size_t *size) argument
118 if (kVerbose) SNPRINTF_OR_RETURN(*str, *size, "# Got %d samples for %s\n", mDataLen, mName);
121 SNPRINTF_OR_RETURN(*str, *size, "# StopWatch %s total/cumulative duration %f Samples: %d\n",
123 printThroughput(str, size);
124 printAverageMinMax(str, size);
130 SNPRINTF_OR_RETURN(*str, *size, "# Name Iterations Duration Min MinIdx Max MaxIdx SizeKbytes\n");
131 SNPRINTF_OR_RETURN(*str, *siz
217 printAverageMinMax(char **str, size_t *size) argument
228 printThroughput(char **str, size_t *size) argument
[all...]
H A Dtestcase.cpp99 char *str = buffer; local
102 testTimer()->sprint(&str, &size_left);
103 if(openTimer()->used()) openTimer()->sprint(&str, &size_left);
104 if(readTimer()->used()) readTimer()->sprint(&str, &size_left);
105 if(writeTimer()->used()) writeTimer()->sprint(&str, &size_left);
106 if(syncTimer()->used()) syncTimer()->sprint(&str, &size_left);
107 if(truncateTimer()->used()) truncateTimer()->sprint(&str, &size_left);
108 if(traverseTimer()->used()) traverseTimer()->sprint(&str, &size_left);
110 write(mIpc[TestCase::WRITE_TO_PARENT], buffer, str - buffer);
/system/bluetooth/bluedroid/
H A Dbluetooth.c303 int ba2str(const bdaddr_t *ba, char *str) { argument
304 return sprintf(str, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
308 int str2ba(const char *str, bdaddr_t *ba) { argument
311 ba->b[i] = (uint8_t) strtoul(str, (char **) &str, 16);
312 str++;
/system/core/libcorkscrew/
H A Dsymbol_table.c116 char *str = NULL; local
121 str = base + shdr[str_idx].sh_offset;
141 && str[syms[i].st_name]
178 && str[syms[i].st_name]
181 table->symbols[symbol_index].name = strdup(str + syms[i].st_name);
/system/core/libdiskconfig/
H A Ddiskconfig.c38 parse_len(const char *str, uint64_t *plen) argument
44 strncpy(tmp, str, sizeof(tmp));
67 ALOGE("Invalid length specified: %s", str);
/system/core/libsysutils/src/
H A DNetlinkEvent.cpp139 /* If the string between 'str' and 'end' begins with 'prefixlen' characters
140 * from the 'prefix' array, then return 'str + prefixlen', otherwise return
144 has_prefix(const char* str, const char* end, const char* prefix, size_t prefixlen) argument
146 if ((end-str) >= (ptrdiff_t)prefixlen && !memcmp(str, prefix, prefixlen))
147 return str + prefixlen;
156 #define HAS_CONST_PREFIX(str,end,prefix) has_prefix((str),(end),prefix,CONST_STRLEN(prefix))
/system/core/sh/
H A Dhistedit.c400 out1str(he.str);
403 fc_replace(he.str, pat, repl) : he.str;
480 str_to_event(const char *str, int last) argument
483 const char *s = str;
516 str);
521 retval = history(hist, &he, H_PREV_STR, str);
523 error("history pattern not found: %s", str);
/system/extras/tests/binder/benchmarks/
H A DbinderAddInts.cpp95 static ostream &operator<<(ostream &stream, const String16& str);
361 static ostream &operator<<(ostream &stream, const String16& str) argument
363 for (unsigned int n1 = 0; n1 < str.size(); n1++) {
364 if ((str[n1] > 0x20) && (str[n1] < 0x80)) {
365 stream << (char) str[n1];
/system/extras/tests/lib/testUtil/
H A DtestUtil.c398 char str[MAXSTR]; local
411 while (fgets(str, sizeof(str), fp) != NULL) {
412 if ((strlen(str) > 1) && (str[strlen(str) - 1] == '\n')) {
413 str[strlen(str) - 1] = '\0';
415 testPrintI(" out: %s", str);
/system/extras/atrace/
H A Datrace.c108 bool writeStr(const char* filename, const char* str) argument
118 ssize_t len = strlen(str);
119 if (write(fd, str, len) != len) {
249 char str[32] = "1"; local
254 snprintf(str, 32, "%d", size);
255 return writeStr(k_traceBufferSizePath, str);
/system/extras/tests/fstest/
H A Dperm_checker.c70 static uid_t str2uid(char *str, int line_num) argument
74 if (isdigit(str[0]))
75 return (uid_t) atol(str);
77 if (!(pw = getpwnam(str))) {
78 printf("# ERROR # Invalid uid '%s' reading line %d\n", str, line_num);
84 static gid_t str2gid(char *str, int line_num) argument
88 if (isdigit(str[0]))
89 return (uid_t) atol(str);
91 if (!(gr = getgrnam(str))) {
92 printf("# ERROR # Invalid gid '%s' reading line %d\n", str, line_nu
[all...]

Completed in 323 milliseconds

12