Lines Matching refs:count
155 static int readx(int s, void *_buf, int count)
159 if (count < 0) return -1;
160 while (n < count) {
161 r = read(s, buf + n, count - n);
176 static int writex(int s, const void *_buf, int count)
180 if (count < 0) return -1;
181 while (n < count) {
182 r = write(s, buf + n, count - n);
204 unsigned short count;
247 count = n;
250 if (writex(s, &count, sizeof(count))) return -1;
251 if (writex(s, cmd, count)) return -1;
262 for (i = 0; i < android_system_dirs.count; i++) {
303 android_system_dirs.count = 2;
305 android_system_dirs.dirs = calloc(android_system_dirs.count, sizeof(dir_rec_t));
533 int lsocket, s, count;
571 unsigned short count;
572 if (readx(s, &count, sizeof(count))) {
576 if ((count < 1) || (count >= BUFFER_MAX)) {
577 ALOGE("invalid size %d\n", count);
580 if (readx(s, buf, count)) {
584 buf[count] = 0;