Home
last modified time | relevance | path

Searched refs:p (Results 1 – 25 of 99) sorted by relevance

1234

/system/core/vold/
Dgeom_mbr_enc.c42 const uint8_t *p = (const uint8_t *)buf; in le32dec() local
44 return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]); in le32dec()
50 unsigned char *p = (unsigned char *)pp; in le32enc() local
52 p[0] = u & 0xff; in le32enc()
53 p[1] = (u >> 8) & 0xff; in le32enc()
54 p[2] = (u >> 16) & 0xff; in le32enc()
55 p[3] = (u >> 24) & 0xff; in le32enc()
61 unsigned char const *p = pp; in dos_partition_dec() local
63 d->dp_flag = p[0]; in dos_partition_dec()
64 d->dp_shd = p[1]; in dos_partition_dec()
[all …]
Dmisc.c69 char *p = &buffer[strlen(buffer)-1]; in truncate_sysfs_path() local
71 for (p = &buffer[strlen(buffer) -1]; *p != '/'; p--); in truncate_sysfs_path()
72 *p = '\0'; in truncate_sysfs_path()
81 char *p; in read_sysfs_var() local
85 p = read_file(filename, &sz); in read_sysfs_var()
86 p[(strlen(p) - 1)] = '\0'; in read_sysfs_var()
87 strncpy(buffer, p, maxlen); in read_sysfs_var()
88 free(p); in read_sysfs_var()
/system/core/sh/
Dexpand.c137 char *p; in expandarg() local
148 p = grabstackstr(expdest); in expandarg()
154 ifsbreakup(p, &exparg); in expandarg()
160 rmescapes(p); in expandarg()
162 sp->text = p; in expandarg()
183 argstr(char *p, int flag) in argstr() argument
194 if (*p == '~' && (flag & (EXP_TILDE | EXP_VARTILDE))) in argstr()
195 p = exptilde(p, flag); in argstr()
197 switch (c = *p++) { in argstr()
203 if (p[0] == CTLVAR && p[2] == '@' && p[3] == '=') in argstr()
[all …]
Dmemalloc.h67 #define STARTSTACKSTR(p) p = stackblock(), sstrnleft = stackblocksize() argument
68 #define STPUTC(c, p) (--sstrnleft >= 0? (*p++ = (c)) : (p = growstackstr(), *p++ = (c))) argument
69 #define CHECKSTRSPACE(n, p) { if (sstrnleft < n) p = makestrspace(); } argument
70 #define USTPUTC(c, p) (--sstrnleft, *p++ = (c)) argument
71 #define STACKSTRNUL(p) (sstrnleft == 0? (p = growstackstr(), *p = '\0') : (*p = '\0')) argument
72 #define STUNPUTC(p) (++sstrnleft, --p) argument
73 #define STTOPC(p) p[-1] argument
74 #define STADJUST(amount, p) (p += (amount), sstrnleft -= (amount)) argument
75 #define grabstackstr(p) stalloc(stackblocksize() - sstrnleft) argument
77 #define ckfree(p) free((pointer)(p)) argument
Dcd.c83 char *p, *d; in cdcmd() local
104 p = strstr(curdir, dest); in cdcmd()
105 if (!p) in cdcmd()
108 memcpy(d, curdir, p - curdir); in cdcmd()
109 strcpy(d + (p - curdir), argptr[1]); in cdcmd()
110 strcat(d, p + strlen(dest)); in cdcmd()
124 while ((p = padvance(&path, dest)) != NULL) { in cdcmd()
125 if (stat(p, &statb) >= 0 && S_ISDIR(statb.st_mode)) { in cdcmd()
130 if (p[0] == '.' && p[1] == '/' && p[2] != '\0') in cdcmd()
131 p += 2; in cdcmd()
[all …]
Doptions.c125 shellparam.p = argptr; in procargs()
155 char *p; in options() local
161 while ((p = *argptr) != NULL) { in options()
163 if ((c = *p++) == '-') { in options()
165 if (p[0] == '\0' || (p[0] == '-' && p[1] == '\0')) { in options()
168 if (p[0] == '\0') in options()
182 while ((c = *p++) != '\0') { in options()
287 shellparam.p = newparam; in setparam()
302 for (ap = param->p ; *ap ; ap++) in freeparam()
304 ckfree(param->p); in freeparam()
[all …]
Dmemalloc.c61 pointer p; in ckmalloc() local
63 p = malloc(nbytes); in ckmalloc()
64 if (p == NULL) in ckmalloc()
66 return p; in ckmalloc()
75 ckrealloc(pointer p, int nbytes) in ckrealloc() argument
77 p = realloc(p, nbytes); in ckrealloc()
78 if (p == NULL) in ckrealloc()
80 return p; in ckrealloc()
91 char *p; in savestr() local
93 p = ckmalloc(strlen(s) + 1); in savestr()
[all …]
Dshow.c168 char *p; in sharg() local
177 for (p = arg->narg.text ; *p ; p++) { in sharg()
178 switch (*p) { in sharg()
180 putc(*++p, fp); in sharg()
185 subtype = *++p; in sharg()
189 while (*p != '=') in sharg()
190 putc(*p++, fp); in sharg()
242 putc(*p, fp); in sharg()
320 char *p; in trstring() local
326 for (p = s ; *p ; p++) { in trstring()
[all …]
Dvar.c222 const char *p; in setvar() local
231 p = name; in setvar()
232 if (! is_name(*p)) in setvar()
234 p++; in setvar()
236 if (! is_in_name(*p)) { in setvar()
237 if (*p == '\0' || *p == '=') in setvar()
241 p++; in setvar()
243 namelen = p - name; in setvar()
464 print_quoted(const char *p) in print_quoted() argument
468 if (strcspn(p, "|&;<>()$`\\\"' \t\n*?[]#~=%") == strlen(p)) { in print_quoted()
[all …]
Dmiscbltin.c96 char *p; in readcmd() local
125 STARTSTACKSTR(p); in readcmd()
139 STPUTC(c, p); in readcmd()
153 STPUTC(c, p); in readcmd()
160 STPUTC(c, p); in readcmd()
171 STPUTC(c, p); in readcmd()
181 STPUTC(c, p); in readcmd()
185 STACKSTRNUL(p); in readcmd()
188 STARTSTACKSTR(p); in readcmd()
190 STACKSTRNUL(p); in readcmd()
[all …]
/system/core/libzipfile/
Dcentraldir.c67 const unsigned char* p; in read_central_directory_entry() local
90 p = *buf; in read_central_directory_entry()
97 if (read_le_int(&p[0x00]) != ENTRY_SIGNATURE) { in read_central_directory_entry()
102 versionMadeBy = read_le_short(&p[0x04]); in read_central_directory_entry()
103 versionToExtract = read_le_short(&p[0x06]); in read_central_directory_entry()
104 gpBitFlag = read_le_short(&p[0x08]); in read_central_directory_entry()
105 entry->compressionMethod = read_le_short(&p[0x0a]); in read_central_directory_entry()
106 lastModFileTime = read_le_short(&p[0x0c]); in read_central_directory_entry()
107 lastModFileDate = read_le_short(&p[0x0e]); in read_central_directory_entry()
108 crc32 = read_le_int(&p[0x10]); in read_central_directory_entry()
[all …]
/system/wlan/ti/sta_dk_4_0_4_32/pform/common/src/
DosRgstry.c1063 initTable_t* p = (initTable_t*) pInitTable; in regFillInitTable() local
1083 NdisZeroMemory(p, sizeof(initTable_t)); in regFillInitTable()
1093 sizeof p->TnetwDrv_InitParams.arpIpFilterParams.isFilterEnabled, in regFillInitTable()
1094 (PUCHAR)&p->TnetwDrv_InitParams.arpIpFilterParams.isFilterEnabled ); in regFillInitTable()
1097 …regConvertStringtoIpAddress(staArpIpAddress, (PUCHAR)&(p->TnetwDrv_InitParams.arpIpFilterParams.ar… in regFillInitTable()
1103 sizeof p->siteMgrInitParams.beaconFilterParams.desiredState, in regFillInitTable()
1104 (PUCHAR)&p->siteMgrInitParams.beaconFilterParams.desiredState ); in regFillInitTable()
1108 sizeof p->siteMgrInitParams.beaconFilterParams.numOfStored, in regFillInitTable()
1109 (PUCHAR)&p->siteMgrInitParams.beaconFilterParams.numOfStored ); in regFillInitTable()
1116 sizeof p->siteMgrInitParams.beaconFilterParams.IETableSize, in regFillInitTable()
[all …]
/system/core/adb/
Dtransport_usb.c33 static inline void fix_endians(apacket *p) in fix_endians() argument
35 p->msg.command = H4(p->msg.command); in fix_endians()
36 p->msg.arg0 = H4(p->msg.arg0); in fix_endians()
37 p->msg.arg1 = H4(p->msg.arg1); in fix_endians()
38 p->msg.data_length = H4(p->msg.data_length); in fix_endians()
39 p->msg.data_check = H4(p->msg.data_check); in fix_endians()
40 p->msg.magic = H4(p->msg.magic); in fix_endians()
47 #define fix_endians(p) do {} while (0) argument
54 static int remote_read(apacket *p, atransport *t) in remote_read() argument
56 if(usb_read(t->usb, &p->msg, sizeof(amessage))){ in remote_read()
[all …]
Dtransport_local.c30 static inline void fix_endians(apacket *p) in fix_endians() argument
32 p->msg.command = H4(p->msg.command); in fix_endians()
33 p->msg.arg0 = H4(p->msg.arg0); in fix_endians()
34 p->msg.arg1 = H4(p->msg.arg1); in fix_endians()
35 p->msg.data_length = H4(p->msg.data_length); in fix_endians()
36 p->msg.data_check = H4(p->msg.data_check); in fix_endians()
37 p->msg.magic = H4(p->msg.magic); in fix_endians()
40 #define fix_endians(p) do {} while (0) argument
55 static int remote_read(apacket *p, atransport *t) in remote_read() argument
57 if(readx(t->sfd, &p->msg, sizeof(amessage))){ in remote_read()
[all …]
Dsockets.c127 static int local_socket_enqueue(asocket *s, apacket *p) in local_socket_enqueue() argument
129 D("LS(%d): enqueue %d\n", s->id, p->len); in local_socket_enqueue()
131 p->ptr = p->data; in local_socket_enqueue()
144 while(p->len > 0) { in local_socket_enqueue()
145 int r = adb_write(s->fd, p->ptr, p->len); in local_socket_enqueue()
147 p->len -= r; in local_socket_enqueue()
148 p->ptr += r; in local_socket_enqueue()
160 if(p->len == 0) { in local_socket_enqueue()
161 put_apacket(p); in local_socket_enqueue()
166 p->next = 0; in local_socket_enqueue()
[all …]
Dtransport.c93 char *p = (char*)ppacket; /* really read a packet address */ in read_packet() local
97 r = adb_read(fd, p, len); in read_packet()
100 p += r; in read_packet()
136 char *p = (char*) ppacket; /* we really write the packet address */ in write_packet() local
163 r = adb_write(fd, p, len); in write_packet()
166 p += r; in write_packet()
179 apacket *p = 0; in transport_socket_events() local
180 if(read_packet(fd, &p)){ in transport_socket_events()
183 handle_packet(p, (atransport *) _t); in transport_socket_events()
188 void send_packet(apacket *p, atransport *t) in send_packet() argument
[all …]
Dadb.c75 const char* p = getenv("ADB_TRACE"); in adb_trace_init() local
96 if (p == NULL) in adb_trace_init()
100 while (*p) { in adb_trace_init()
103 q = strpbrk(p, " ,:;"); in adb_trace_init()
105 q = p + strlen(p); in adb_trace_init()
107 len = q - p; in adb_trace_init()
113 if (len == taglen && !memcmp(tags[tagn].tag, p, len) ) in adb_trace_init()
124 p = q; in adb_trace_init()
125 if (*p) in adb_trace_init()
126 p++; in adb_trace_init()
[all …]
/system/extras/showslab/
Dshowslab.c62 struct slab_info *head = NULL, *p = NULL, *prev = NULL; in get_slabinfo() local
97 p = malloc(sizeof (struct slab_info)); in get_slabinfo()
98 if (!p) { in get_slabinfo()
104 head = prev = p; in get_slabinfo()
108 slabdata %lu %lu %*d", p->name, in get_slabinfo()
109 &p->nr_active_objs, &p->nr_objs, in get_slabinfo()
110 &p->obj_size, &p->objs_per_slab, in get_slabinfo()
113 &p->nr_slabs); in get_slabinfo()
121 if (p->obj_size < stats->min_obj_size) in get_slabinfo()
122 stats->min_obj_size = p->obj_size; in get_slabinfo()
[all …]
/system/core/nexus/
DSupplicantAssociatingEvent.cpp28 char *p = event; in SupplicantAssociatingEvent() local
40 strncpy(mBssid, p, 17); in SupplicantAssociatingEvent()
42 p += 25; in SupplicantAssociatingEvent()
47 char *q = index(p, '\''); in SupplicantAssociatingEvent()
49 LOGE("Unable to decode SSID (p = {%s})\n", p); in SupplicantAssociatingEvent()
52 mSsid = (char *) malloc((q - p) +1); in SupplicantAssociatingEvent()
53 strncpy(mSsid, p, q-p); in SupplicantAssociatingEvent()
54 mSsid[q-p] = '\0'; in SupplicantAssociatingEvent()
56 p = q + 7; in SupplicantAssociatingEvent()
61 if (!(q = index(p, ' '))) { in SupplicantAssociatingEvent()
[all …]
DScanResult.cpp29 char *p = rawResult, *q = rawResult; in ScanResult() local
33 for (q = p; *q != '\t'; ++q); in ScanResult()
34 strncpy(tmp, p, (q - p)); in ScanResult()
35 tmp[q-p] = '\0'; in ScanResult()
40 for (p = q; *q != '\t'; ++q); in ScanResult()
41 strncpy(tmp, p, (q - p)); in ScanResult()
42 tmp[q-p] = '\0'; in ScanResult()
47 for (p = q; *q != '\t'; ++q); in ScanResult()
48 strncpy(tmp, p, (q - p)); in ScanResult()
49 tmp[q-p] = '\0'; in ScanResult()
[all …]
DSupplicantConnectedEvent.cpp26 char *p; in SupplicantConnectedEvent() local
30 if ((p = index(event + 2, ' ')) && (++p = index(p, ' '))) { in SupplicantConnectedEvent()
32 strncpy(mBssid, ++p, 17); in SupplicantConnectedEvent()
39 if ((p = index(p, ' ')) && ((++p = index(p, ' ')))) { in SupplicantConnectedEvent()
40 if (!strncmp(++p, "(auth)", 6)) in SupplicantConnectedEvent()
/system/core/sh/bltin/
Decho.c62 char *p; in echocmd() local
72 if ((p = *ap) != NULL) { in echocmd()
73 if (equal(p, "-n")) { in echocmd()
76 } else if (equal(p, "-e")) { in echocmd()
82 while ((p = *ap++) != NULL) { in echocmd()
83 while ((c = *p++) != '\0') { in echocmd()
85 switch (*p++) { in echocmd()
99 while (--count >= 0 && (unsigned)(*p - '0') < 8) in echocmd()
100 c = (c << 3) + (*p++ - '0'); in echocmd()
104 p--; in echocmd()
/system/core/libmincrypt/
Dsha.c35 uint8_t *p = ctx->buf; in SHA1_transform() local
39 uint32_t tmp = *p++ << 24; in SHA1_transform()
40 tmp |= *p++ << 16; in SHA1_transform()
41 tmp |= *p++ << 8; in SHA1_transform()
42 tmp |= *p++; in SHA1_transform()
93 const uint8_t* p = (const uint8_t*)data; in SHA_update() local
98 ctx->buf[i++] = *p++; in SHA_update()
106 uint8_t *p = ctx->buf; in SHA_final() local
121 *p++ = tmp >> 24; in SHA_final()
122 *p++ = tmp >> 16; in SHA_final()
[all …]
/system/core/toolbox/
Diftop.c103 char *p; in get_interfaces() local
123 p = strchr(buf, '\n'); in get_interfaces()
124 if (!p) { in get_interfaces()
128 p = strchr(p + 1, '\n'); in get_interfaces()
129 if (!p) { in get_interfaces()
133 p += 1; in get_interfaces()
143 ret = sscanf(p, "%" STR(IFNAMSIZ) "s", ifs->name); in get_interfaces()
157 p = strchr(p, ':') + 1; in get_interfaces()
159 ret = sscanf(p, "%u %u %u %u %*u %*u %*u %*u %u %u %u %u %*u %*u " in get_interfaces()
170 p = strchr(p, '\n') + 1; in get_interfaces()
[all …]
/system/extras/tests/memtest/
Dthumb.cpp4 extern "C" void arm_function_3(int*p);
5 extern "C" void thumb_function_1(int*p);
6 extern "C" void thumb_function_2(int*p);
16 void thumb_function_1(int*p) in thumb_function_1() argument
22 void thumb_function_2(int*p) in thumb_function_2() argument

1234