/system/core/libcutils/ |
H A D | buffer.c | 17 #define LOG_TAG "buffer" 24 #include "buffer.h" 28 Buffer* buffer = malloc(sizeof(Buffer)); local 29 if (buffer == NULL) { 32 buffer->capacity = capacity; 33 buffer->expected = 0; 34 buffer->data = malloc(capacity); 35 if (buffer->data == NULL) { 36 free(buffer); 39 return buffer; 42 bufferFree(Buffer* buffer) argument 48 Buffer* buffer = malloc(sizeof(Buffer)); local 60 bufferPrepareForRead(Buffer* buffer, size_t expected) argument 77 bufferRead(Buffer* buffer, int fd) argument 92 bufferPrepareForWrite(Buffer* buffer) argument 96 bufferWrite(Buffer* buffer, int fd) argument [all...] |
H A D | buffer.h | 18 * Byte buffer utilities. 31 * Byte buffer of known size. Keeps track of how much data has been read 32 * into or written out of the buffer. 46 /** Actual # of bytes in the buffer. */ 49 /** Amount of memory allocated for this buffer. */ 54 * Returns true if all data has been read into the buffer. 56 #define bufferReadComplete(buffer) (buffer->expected == buffer->size) 59 * Returns true if the buffer ha [all...] |
H A D | record_stream.c | 37 unsigned char *buffer; member in struct:RecordStream 55 ret->buffer = (unsigned char *)malloc (maxRecordLen + HEADER_SIZE); 57 ret->unconsumed = ret->buffer; 58 ret->read_end = ret->buffer; 59 ret->buffer_end = ret->buffer + maxRecordLen + HEADER_SIZE; 67 free(rs->buffer); 72 /* returns NULL; if there isn't a full record in the buffer */ 102 /* one full line in the buffer */ 134 /* is there one record already in the buffer? */ 142 // if the buffer i [all...] |
/system/core/nexus/ |
H A D | DhcpEvent.cpp | 24 char *DhcpEvent::toString(int val, char *buffer, int max) { argument 26 strncpy(buffer, "UNKNOWN", max); 28 strncpy(buffer, "STOP", max); 30 strncpy(buffer, "RENEW", max); 32 strncpy(buffer, "RELEASE", max); 34 strncpy(buffer, "TIMEOUT", max); 36 strncpy(buffer, "(internal error)", max); 38 return buffer; 41 int DhcpEvent::parseString(const char *buffer) { argument 42 if (!strcasecmp(buffer, "UNKNOW [all...] |
H A D | DhcpState.cpp | 24 char *DhcpState::toString(int val, char *buffer, int max) { argument 26 strncpy(buffer, "INIT", max); 28 strncpy(buffer, "DISCOVERING", max); 30 strncpy(buffer, "REQUESTING", max); 32 strncpy(buffer, "BOUND", max); 34 strncpy(buffer, "RENEWING", max); 36 strncpy(buffer, "REBINDING", max); 38 strncpy(buffer, "REBOOT", max); 40 strncpy(buffer, "RENEW_REQUESTED", max); 42 strncpy(buffer, "INIT_IPV4L 53 parseString(const char *buffer) argument [all...] |
H A D | SupplicantState.cpp | 24 char *SupplicantState::toString(int val, char *buffer, int max) { argument 26 strncpy(buffer, "UNKNOWN", max); 28 strncpy(buffer, "DISCONNECTED", max); 30 strncpy(buffer, "INACTIVE", max); 32 strncpy(buffer, "SCANNING", max); 34 strncpy(buffer, "ASSOCIATING", max); 36 strncpy(buffer, "ASSOCIATED", max); 38 strncpy(buffer, "FOURWAY_HANDSHAKE", max); 40 strncpy(buffer, "GROUP_HANDSHAKE", max); 42 strncpy(buffer, "COMPLETE [all...] |
H A D | DhcpEvent.h | 28 static char *toString(int val, char *buffer, int max); 30 static int parseString(const char *buffer);
|
H A D | DhcpListener.cpp | 41 char buffer[255]; local 44 if ((rc = read(cli->getSocket(), buffer, sizeof(buffer))) < 0) { 49 if (!strncmp(buffer, "STATE:", 6)) { 50 char *next = buffer; 56 LOGW("Error parsing state '%s'", buffer); 63 } else if (!strncmp(buffer, "ADDRINFO:", 9)) { 64 char *next = buffer + 9; 88 } else if (!strncmp(buffer, "EVENT:", 6)) { 89 char *next = buffer; [all...] |
H A D | DhcpState.h | 34 static char *toString(int val, char *buffer, int max); 36 static int parseString(const char *buffer);
|
H A D | Property.cpp | 50 int StringProperty::get(int idx, int *buffer) { argument 55 int StringProperty::get(int idx, struct in_addr *buffer) { argument 62 char *buffer, size_t max) : 64 mBuffer = buffer; 78 int StringPropertyHelper::get(int idx, char *buffer, size_t max) { argument 84 strncpy(buffer, mBuffer, max); 102 int IntegerProperty::get(int idx, char *buffer, size_t max) { argument 107 int IntegerProperty::get(int idx, struct in_addr *buffer) { argument 114 int *buffer) : 116 mBuffer = buffer; 61 StringPropertyHelper(const char *name, bool ro, char *buffer, size_t max) argument 113 IntegerPropertyHelper(const char *name, bool ro, int *buffer) argument 129 get(int idx, int *buffer) argument 153 get(int idx, char *buffer, size_t max) argument 158 get(int idx, int *buffer) argument 164 IPV4AddressPropertyHelper(const char *name, bool ro, struct in_addr *buffer) argument 180 get(int idx, struct in_addr *buffer) argument [all...] |
H A D | Property.h | 44 virtual int get(int idx, char *buffer, size_t max) = 0; 45 virtual int get(int idx, int *buffer) = 0; 46 virtual int get(int idx, struct in_addr *buffer) = 0; 63 virtual int get(int idx, char *buffer, size_t max) = 0; 64 int get(int idx, int *buffer); 65 int get(int idx, struct in_addr *buffer); 73 char *buffer, size_t max); 75 int get(int idx, char *buffer, size_t max); 87 int get(int idx, char *buffer, size_t max); 88 virtual int get(int idx, int *buffer) [all...] |
H A D | SupplicantState.h | 33 static char *toString(int val, char *buffer, int max);
|
/system/media/wilhelm/src/ |
H A D | interfaces.c | 131 void MPH_to_MPH_string(unsigned MPH, char buffer[40]) argument 136 strcpy(buffer, "MPH"); 137 strcpy(&buffer[3], infix); 138 strcat(buffer, "_"); 139 strcat(buffer, interface_names[MPH]);
|
/system/media/wilhelm/tools/hashgen/ |
H A D | interfaces.c | 131 void MPH_to_MPH_string(unsigned MPH, char buffer[40]) argument 136 strcpy(buffer, "MPH"); 137 strcpy(&buffer[3], infix); 138 strcat(buffer, "_"); 139 strcat(buffer, interface_names[MPH]);
|
H A D | frag3.c | 4 extern void MPH_to_MPH_string(unsigned MPH, char buffer[40]); 18 char buffer[40]; local 19 buffer[39] = 'x'; 20 MPH_to_MPH_string(MPH, buffer); 21 assert('x' == buffer[39]); 22 printf(" %s", buffer);
|
/system/bluetooth/brfpatch/ |
H A D | brfpatch.c | 77 static void process_line(FILE *file_out, char *buf, char *buffer) { argument 78 FAILIF(strncmp(buf, "Send_", 5) != 0, "Not expecting: %s\n", buffer); 83 FAILIF(advance(&buf), "Could not find opcode in: %s\n", buffer); local 85 "Could not find opcode in: %s\n", buffer); 97 "Too much data: %s\n", buffer); 99 "Error parsing (%d): %s\n", __LINE__, buffer); 108 FAILIF(*buf != 'x', "Error parsing: %s\n", buffer); 120 "Error parsing (%d): %s\n", __LINE__, buffer); 126 "Error parsing (%d): %s\n", __LINE__, buffer); 132 "Error parsing (%d): %s\n", __LINE__, buffer); 177 char buffer[1024]; local [all...] |
/system/media/audio_utils/ |
H A D | echo_reference.c | 47 void *buffer; // main buffer member in struct:echo_reference 48 size_t buf_size; // main buffer size in frames 49 size_t frames_in; // number of frames in main buffer 50 void *wr_buf; // buffer for input conversions 51 size_t wr_buf_size; // size of conversion buffer in frames 52 size_t wr_frames_in; // number of frames in conversion buffer 53 void *wr_src_buf; // resampler input buf (either wr_buf or buffer used by write()) 56 int32_t playback_delay; // playback buffer delay indicated by last write() 60 struct resampler_buffer_provider provider; // resampler buffer provide 64 echo_reference_get_next_buffer(struct resampler_buffer_provider *buffer_provider, struct resampler_buffer* buffer) argument 89 echo_reference_release_buffer(struct resampler_buffer_provider *buffer_provider, struct resampler_buffer* buffer) argument 118 echo_reference_write(struct echo_reference_itfe *echo_reference, struct echo_reference_buffer *buffer) argument 263 echo_reference_read(struct echo_reference_itfe *echo_reference, struct echo_reference_buffer *buffer) argument [all...] |
/system/vold/tests/ |
H A D | VolumeManager_test.cpp | 38 char buffer[MD5_ASCII_LENGTH_PLUS_NULL]; local 39 char* dst = reinterpret_cast<char*>(&buffer); 44 EXPECT_TRUE(VolumeManager::asecHash(exp1, (char*)NULL, sizeof(buffer)) == NULL && errno == ESPIPE) 45 << "Should return NULL and set errno to ESPIPE when destination buffer is NULL"; 47 << "Should return NULL and set errno to ESPIPE when destination buffer length is 0"; 48 EXPECT_TRUE(VolumeManager::asecHash((const char*)NULL, dst, sizeof(buffer)) == NULL && errno == ESPIPE) 49 << "Should return NULL and set errno to ESPIPE when source buffer is NULL"; 51 EXPECT_FALSE(VolumeManager::asecHash(src1, dst, sizeof(buffer)) == NULL) 58 EXPECT_FALSE(VolumeManager::asecHash(src2, dst, sizeof(buffer)) == NULL)
|
/system/vold/ |
H A D | Devmapper.cpp | 43 char *buffer = (char *) malloc(1024 * 64); local 44 if (!buffer) { 48 memset(buffer, 0, (1024 * 64)); 53 free(buffer); 60 free(buffer); 65 struct dm_ioctl *io = (struct dm_ioctl *) buffer; 70 free(buffer); 76 struct dm_name_list *n = (struct dm_name_list *) (((char *) buffer) + io->data_start); 78 free(buffer); 111 free(buffer); 134 char *buffer = (char *) malloc(DEVMAPPER_BUFFER_SIZE); local 168 char *buffer = (char *) malloc(DEVMAPPER_BUFFER_SIZE); local 265 char *buffer = (char *) malloc(DEVMAPPER_BUFFER_SIZE); local [all...] |
/system/core/logwrapper/ |
H A D | logwrapper.c | 49 char buffer[4096]; local 54 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) { 59 if (buffer[b] == '\r') { 60 buffer[b] = '\0'; 61 } else if (buffer[b] == '\n') { 62 buffer[b] = '\0'; 63 LOG(LOG_INFO, tag, "%s", &buffer[a]); 68 if (a == 0 && b == sizeof(buffer) - 1) { 69 // buffer i [all...] |
/system/core/toolbox/ |
H A D | log.c | 94 char buffer[4096]; local 130 buffer[0] = '\0'; 133 strncat(buffer, argv[i], sizeof(buffer)-1); 134 strncat(buffer, " ", sizeof(buffer)-1); 137 if(buffer[0] == 0) { 141 __android_log_print(priority, tag, "%s", buffer);
|
H A D | dmesg.c | 13 char buffer[KLOG_BUF_LEN + 1]; local 14 char *p = buffer; 24 n = klogctl(op, buffer, KLOG_BUF_LEN); 29 buffer[n] = '\0';
|
/system/core/include/sysutils/ |
H A D | NetlinkEvent.h | 41 bool decode(char *buffer, int size, int format = NetlinkListener::NETLINK_FORMAT_ASCII); 50 bool parseBinaryNetlinkMessage(char *buffer, int size); 51 bool parseAsciiNetlinkMessage(char *buffer, int size);
|
/system/core/include/cutils/ |
H A D | uevent.h | 28 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length);
|
/system/core/libsysutils/src/ |
H A D | FrameworkClient.cpp | 34 char *buffer = (char *) alloca(bufflen); local 35 if (!buffer) { 39 snprintf(buffer, bufflen, "%s%s", msg, data); 40 return sendMsg(buffer);
|