Searched refs:buffer (Results 51 - 75 of 87) sorted by path

1234

/system/core/toolbox/
H A Dmount.c219 char buffer[100]; local
228 length = fread(buffer, 1, 100, f);
230 fwrite(buffer, 1, length, stdout);
H A Dnandread.c32 void *buffer; local
138 buffer = malloc(mtdinfo.writesize + mtdinfo.oobsize + spare_size);
139 if (!buffer) {
146 oob_data = (uint32_t *)((uint8_t *)buffer + mtdinfo.writesize);
194 ret = read(fd, buffer, mtdinfo.writesize + rawmode);
242 ret = write(outfd, buffer, mtdinfo.writesize + spare_size);
261 if (test_empty(buffer, mtdinfo.writesize + mtdinfo.oobsize + spare_size))
H A Duptime.c41 static void format_time(int time, char* buffer) { argument
52 sprintf(buffer, "%d days, %02d:%02d:%02d", days, hours, minutes, seconds);
54 sprintf(buffer, "%02d:%02d:%02d", hours, minutes, seconds);
/system/extras/ext4_utils/
H A Dsha1.c126 void SHA1Transform(state, buffer)
128 const u_char buffer[64];
137 assert(buffer != 0);
142 (void)memcpy(block, buffer, 64);
144 block = (CHAR64LONG16 *)(void *)buffer;
232 (void)memcpy(&context->buffer[j], data, (i = 64-j));
233 SHA1Transform(context->state, context->buffer);
240 (void)memcpy(&context->buffer[j], &data[i], len - i);
H A Dsha1.h33 u_char buffer[64]; member in struct:__anon498
/system/extras/procrank/
H A Dprocrank.c49 char buffer[1024]; local
59 const int len = read(fd, buffer, sizeof(buffer)-1);
66 buffer[len] = 0;
88 char* p = buffer;
300 * Get the process name for a given PID. Inserts the process name into buffer
301 * buf of length len. The size of the buffer must be greater than zero to get
304 * Note that fgets(3) only declares length as an int, so our buffer size is
/system/extras/tests/bionic/libc/common/
H A Dbench_stdio.c42 static char buffer[1024*1024]; variable
55 int totalSize = sizeof(buffer);
57 fread(buffer, 1, chunkSize, fp);
63 int totalSize = sizeof(buffer);
65 fwrite(buffer, 1, chunkSize, fp);
74 double bandwidth = sizeof(buffer)*1000./1024./time_ms; \
/system/extras/tests/framebuffer/
H A Drefresh.c122 uint16_t* buffer = (uint16_t*) mmap(
128 if (buffer == MAP_FAILED)
132 memset(buffer, 0, finfo.smem_len);
133 memset(buffer, 0xff, 320*(info.yres_virtual/2)*2);
/system/extras/tests/sdcard/
H A Dsdcard_perf_test.cpp161 char buffer[kMinKernelVersionBufferSize] = {0, }; local
162 if (kernelVersion(buffer, sizeof(buffer)) > 0)
164 printf("# Kernel: %s", buffer);
187 char buffer[kMinSchedFeaturesBufferSize] = {0, }; local
188 if (schedFeatures(buffer, sizeof(buffer)) > 0)
190 printf("# Sched features: %s", buffer);
286 // @param chunk buffer large enough where the chunk read are written.
H A Dsysutil.cpp70 // Read a C-string from a file. If the buffer is too short, an error
74 // @param size The size of the buffer pointed by str. Must be >= 1.
203 char buffer[16] = {0,}; local
204 sprintf(buffer, "%ld", value);
205 return writeStringToFile(filename, buffer);
209 // message is in a shared buffer, not thread safe, erased by
213 static char buffer[80]; local
217 snprintf(buffer, sizeof(buffer), "ok (%d)", WEXITSTATUS(status));
221 snprintf(buffer, sizeo
[all...]
H A Dtestcase.cpp98 char buffer[32000] = {0,}; local
99 char *str = buffer;
100 size_t size_left = sizeof(buffer);
110 write(mIpc[TestCase::WRITE_TO_PARENT], buffer, str - buffer);
131 char buffer[32000] = {0,}; local
132 while(read(mIpc[READ_FROM_CHILD], buffer, sizeof(buffer)) != 0)
134 printf("%s", buffer);
136 memset(buffer,
[all...]
/system/media/audio_utils/
H A Decho_reference.c47 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
54 void *wr_src_buf; // resampler input buf (either wr_buf or buffer used by write())
57 int32_t playback_delay; // playback buffer delay indicated by last write()
64 struct resampler_buffer_provider provider; // resampler buffer provide
68 echo_reference_get_next_buffer(struct resampler_buffer_provider *buffer_provider, struct resampler_buffer* buffer) argument
93 echo_reference_release_buffer(struct resampler_buffer_provider *buffer_provider, struct resampler_buffer* buffer) argument
129 echo_reference_write(struct echo_reference_itfe *echo_reference, struct echo_reference_buffer *buffer) argument
291 echo_reference_read(struct echo_reference_itfe *echo_reference, struct echo_reference_buffer *buffer) argument
[all...]
/system/media/audio_utils/include/audio_utils/
H A Decho_reference.h28 size_t frame_count; // number of frames in buffer
29 int32_t delay_ns; // delay for this buffer (see comment below)
30 struct timespec time_stamp; // time stamp for this buffer (see comment below)
50 int (*read)(struct echo_reference_itfe *echo_reference, struct echo_reference_buffer *buffer);
51 int (*write)(struct echo_reference_itfe *echo_reference, struct echo_reference_buffer *buffer);
H A Dresampler.h45 * get a new buffer of data:
46 * as input: buffer->frame_count is the number of frames requested
47 * as output: buffer->frame_count is the number of frames returned
48 * buffer->raw points to data returned
51 struct resampler_buffer *buffer);
53 * release a consumed buffer of data:
54 * as input: buffer->frame_count is the number of frames released
55 * buffer->raw points to data released
58 struct resampler_buffer *buffer);
68 * resample input from buffer provide
[all...]
/system/media/camera/src/
H A Dcamera_metadata.c87 void *user; // User set pointer, not copied with buffer
130 void *buffer = malloc(memory_needed); local
131 return place_camera_metadata(buffer, memory_needed,
271 // Appending onto empty buffer, keep sorted state
449 // Shift data buffer to overwrite deleted data
/system/netd/
H A DBandwidthController.cpp160 int BandwidthController::StrncpyAndCheck(char *buffer, const char *src, size_t buffSize) { argument
162 memset(buffer, '\0', buffSize); // strncpy() is not filling leftover with '\0'
163 strncpy(buffer, src, buffSize);
164 return buffer[buffSize - 1];
169 char buffer[MAX_CMD_LEN]; local
172 char *next = buffer;
196 if (StrncpyAndCheck(buffer, fullCmd.c_str(), sizeof(buffer))) {
H A DBandwidthController.h131 static int StrncpyAndCheck(char *buffer, const char *src, size_t buffSize);
H A DCommandListener.cpp945 char buffer[512]; local
947 fgets(buffer, sizeof(buffer), fp); // Header 1
948 fgets(buffer, sizeof(buffer), fp); // Header 2
949 while(fgets(buffer, sizeof(buffer), fp)) {
950 buffer[strlen(buffer)-1] = '\0';
954 sscanf(buffer, "
[all...]
H A DIdletimerController.cpp126 char *buffer; local
135 asprintf(&buffer, "%s %s", IPTABLES_PATH, cmd);
136 res = system_nosh(buffer);
137 ALOGV("%s #%d", buffer, res);
138 free(buffer);
149 char *buffer; local
150 asprintf(&buffer, "-t raw -F %s", LOCAL_RAW_PREROUTING);
151 res = runIpxtablesCmd(buffer);
152 free(buffer);
157 asprintf(&buffer, "
177 char *buffer; local
[all...]
H A DNatController.cpp49 char *buffer; local
59 asprintf(&buffer, "%s %s", path, cmd);
60 res = system_nosh(buffer);
61 ALOGV("runCmd() buffer='%s' res=%d", buffer, res);
62 free(buffer);
H A DThrottleController.cpp44 char *buffer; local
54 asprintf(&buffer, "%s %s", TC_PATH, cmd);
55 res = system_nosh(buffer);
56 free(buffer);
H A Dlogwrapper.c31 char buffer[4096]; local
36 while ((sz = read(parent_read, &buffer[b], sizeof(buffer) - 1 - b)) > 0) {
41 if (buffer[b] == '\r') {
42 buffer[b] = '\0';
43 } else if (buffer[b] == '\n') {
44 buffer[b] = '\0';
46 ALOG(LOG_INFO, tag, "%s", &buffer[a]);
51 if (a == 0 && b == sizeof(buffer) - 1) {
52 // buffer i
171 char buffer[255]; local
[all...]
H A Dndc.c107 char *buffer = malloc(4096); local
125 free(buffer);
132 memset(buffer, 0, 4096);
133 if ((rc = read(sock, buffer, 4096)) <= 0) {
138 free(buffer);
148 if (buffer[i] == '\0') {
152 strncpy(tmp, buffer + offset, 3);
156 printf("%s\n", buffer + offset);
166 free(buffer);
H A Doem_iptables_hook.cpp33 char *buffer; local
42 asprintf(&buffer, "%s %s", IPTABLES_PATH, cmd);
43 res = system_nosh(buffer);
44 free(buffer);
/system/vold/
H A DCommandListener.cpp54 char buffer[4096]; local
55 char *p = buffer;
57 memset(buffer, 0, sizeof(buffer));
64 if (((p - buffer) + len) < (sizeof(buffer)-1)) {
78 SLOGD("%s", buffer);

Completed in 122 milliseconds

1234