Home
last modified time | relevance | path

Searched refs:amt (Results 1 – 25 of 35) sorted by relevance

12

/frameworks/base/libs/androidfw/
DBackupData.cpp69 ssize_t amt; in write_padding_for() local
76 amt = write(m_fd, &padding, paddingSize); in write_padding_for()
77 if (amt != paddingSize) { in write_padding_for()
81 m_pos += amt; in write_padding_for()
93 ssize_t amt; in WriteEntityHeader() local
95 amt = write_padding_for(m_pos); in WriteEntityHeader()
96 if (amt != 0) { in WriteEntityHeader()
97 return amt; in WriteEntityHeader()
123 amt = write(m_fd, &header, sizeof(entity_header_v1)); in WriteEntityHeader()
124 if (amt != sizeof(entity_header_v1)) { in WriteEntityHeader()
[all …]
DBackupHelpers.cpp89 int amt; in read_snapshot_file() local
92 amt = read(fd, &header, sizeof(header)); in read_snapshot_file()
93 if (amt != sizeof(header)) { in read_snapshot_file()
96 bytesRead += amt; in read_snapshot_file()
107 amt = read(fd, &file, sizeof(FileState)); in read_snapshot_file()
108 if (amt != sizeof(FileState)) { in read_snapshot_file()
112 bytesRead += amt; in read_snapshot_file()
119 amt = read(fd, filename, nameBufSize); in read_snapshot_file()
120 if (amt == nameBufSize) { in read_snapshot_file()
123 bytesRead += amt; in read_snapshot_file()
[all …]
/frameworks/base/cmds/incidentd/src/
DFdBuffer.cpp92 ssize_t amt = TEMP_FAILURE_RETRY( in read() local
94 if (amt < 0) { in read()
101 } else if (amt == 0) { in read()
105 mBuffer->wp()->move(amt); in read()
128 ssize_t amt = in readFully() local
130 if (amt < 0) { in readFully()
133 } else if (amt == 0) { in readFully()
138 mBuffer->wp()->move(amt); in readFully()
209 ssize_t amt; in readProcessedDataInStream() local
211 amt = TEMP_FAILURE_RETRY(::read(fd, cirBuf + rpos, BUFFER_SIZE - rpos)); in readProcessedDataInStream()
[all …]
/frameworks/base/libs/protoutil/src/
DProtoFileReader.cpp124 ProtoFileReader::move(size_t amt) in move() argument
126 while (mStatus == NO_ERROR && amt > 0) { in move()
131 mMaxOffset - mOffset > amt ? amt : mMaxOffset - mOffset; in move()
133 amt -= chunk; in move()
150 ssize_t amt = TEMP_FAILURE_RETRY(read(mFd, mBuffer, mChunkSize)); in ensure_data() local
151 if (amt == 0) { in ensure_data()
153 } else if (amt < 0) { in ensure_data()
158 mMaxOffset = amt; in ensure_data()
DEncodedBuffer.cpp60 EncodedBuffer::Pointer::move(size_t amt) in move() argument
62 size_t newOffset = mOffset + amt; in move()
243 size_t amt = reader->currentToRead(); in writeRaw() local
244 err = writeRaw(buf, amt); in writeRaw()
245 reader->move(amt); in writeRaw()
259 size_t amt = reader->currentToRead(); in writeRaw() local
260 if (size < amt) { in writeRaw()
261 amt = size; in writeRaw()
263 err = writeRaw(buf, amt); in writeRaw()
264 reader->move(amt); in writeRaw()
[all …]
/frameworks/base/core/java/android/util/
DTimeUtils.java154 static private int accumField(int amt, int suffix, boolean always, int zeropad) { in accumField() argument
155 if (amt > 999) { in accumField()
157 while (amt != 0) { in accumField()
159 amt /= 10; in accumField()
163 if (amt > 99 || (always && zeropad >= 3)) { in accumField()
166 if (amt > 9 || (always && zeropad >= 2)) { in accumField()
169 if (always || amt > 0) { in accumField()
176 static private int printFieldLocked(char[] formatStr, int amt, char suffix, int pos, in printFieldLocked() argument
178 if (always || amt > 0) { in printFieldLocked()
180 if (amt > 999) { in printFieldLocked()
[all …]
DAtomicFile.java271 int amt = stream.read(data, pos, data.length-pos); in readFully() local
274 if (amt <= 0) { in readFully()
279 pos += amt; in readFully()
/frameworks/base/core/java/android/util/proto/
DEncodedBuffer.java408 int amt = length < (mChunkSize - mWriteIndex) ? length : (mChunkSize - mWriteIndex); in writeRawBuffer()
409 if (amt > 0) { in writeRawBuffer()
410 System.arraycopy(val, offset, mWriteBuffer, mWriteIndex, amt); in writeRawBuffer()
411 mWriteIndex += amt; in writeRawBuffer()
412 length -= amt; in writeRawBuffer()
413 offset += amt; in writeRawBuffer()
418 amt = length < mChunkSize ? length : mChunkSize; in writeRawBuffer()
419 System.arraycopy(val, offset, mWriteBuffer, mWriteIndex, amt); in writeRawBuffer()
420 mWriteIndex += amt; in writeRawBuffer()
421 length -= amt; in writeRawBuffer()
[all …]
/frameworks/base/tools/bit/
Dadb.cpp91 ssize_t amt = read(fd, &byte, 1); in read_varint() local
92 if (amt == 0) { in read_varint()
95 } else if (amt < 0) { in read_varint()
134 ssize_t amt = read(fd, buf+pos, size-pos); in read_sized_buffer() local
135 if (amt == 0) { in read_sized_buffer()
141 } else if (amt < 0) { in read_sized_buffer()
147 pos += amt; in read_sized_buffer()
185 ssize_t amt = size < scratchSize ? size : scratchSize; in skip_bytes() local
186 fprintf(stderr, "skipping %lu/%ld bytes\n", size, amt); in skip_bytes()
187 amt = read(fd, scratch, amt); in skip_bytes()
[all …]
Dcommand.cpp138 ssize_t amt = read(fds[0], buf, size); in get_command_output() local
139 if (amt <= 0) { in get_command_output()
141 } else if (amt > 0) { in get_command_output()
142 result.append(buf, amt); in get_command_output()
/frameworks/base/tools/powermodel/src/com/android/powermodel/
DCsvParser.java70 int amt = input.read(buf, readPos, buf.length-readPos); in parse() local
71 if (amt < 0) { in parse()
73 amt = readPos; in parse()
77 amt += readPos; in parse()
85 while (index < amt) { in parse()
156 if (fieldStart != amt) { in parse()
/frameworks/base/cmds/incidentd/tests/
DProtoFileReader_test.cpp40 size_t amt = reader->currentToRead(); in read() local
41 if (size < amt) { in read()
42 amt = size; in read()
44 reader->move(amt); in read()
45 size -= amt; in read()
DFdBuffer_test.cpp66 ssize_t amt = write(wFd.get(), buf + nWritten, nRead - nWritten); in DoDataStream() local
67 if (amt < 0) { in DoDataStream()
70 nWritten += amt; in DoDataStream()
/frameworks/base/core/jni/
Dandroid_backup_BackupHelperDispatcher.cpp48 ssize_t amt; in readHeader_native() local
54 amt = read(fd, &flattenedHeader.headerSize, sizeof(flattenedHeader.headerSize)); in readHeader_native()
55 if (amt != sizeof(flattenedHeader.headerSize)) { in readHeader_native()
70 amt = read(fd, &flattenedHeader.version, in readHeader_native()
72 if (amt <= 0) { in readHeader_native()
109 amt = read(fd, buf, flattenedHeader.nameLength); in readHeader_native()
/frameworks/av/media/img_utils/src/
DInput.cpp34 size_t amt = (SKIP_BUF_SIZE > remaining) ? remaining : SKIP_BUF_SIZE; in skip() local
35 ssize_t ret = read(skipBuf, 0, amt); in skip()
/frameworks/base/wifi/tests/src/android/net/wifi/
DSoftApConfToXmlMigrationUtilTest.java148 int amt = stream.read(data, pos, data.length - pos); in readFully() local
149 if (amt <= 0) { in readFully()
152 pos += amt; in readFully()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
DFillLightFilter.java128 float amt = 1.0f - mBacklight; in updateParameters() local
129 float mult = 1.0f / (amt * 0.7f + 0.3f); in updateParameters()
/frameworks/base/libs/protoutil/include/android/util/
DEncodedBuffer.h58 Pointer* move(size_t amt);
202 virtual void move(size_t amt);
DProtoReader.h72 virtual void move(size_t amt) = 0;
DProtoFileReader.h51 virtual void move(size_t amt);
/frameworks/base/cmds/incident/
Dmain.cpp213 int amt = splice(read_fd, NULL, write_fd, NULL, 4096, 0); in stream_output() local
214 if (amt < 0) { in stream_output()
216 } else if (amt == 0) { in stream_output()
/frameworks/native/cmds/rawbu/
Dbackup.cpp203 int amt = size > (off_t)sizeof(copyBuffer) ? sizeof(copyBuffer) : (int)size; in copy_file() local
204 int readLen = fread(copyBuffer, 1, amt, src); in copy_file()
208 amt, origSize, srcName, errno != 0 ? strerror(errno) : "unexpected EOF"); in copy_file()
211 amt, origSize, errno != 0 ? strerror(errno) : "unexpected EOF"); in copy_file()
/frameworks/base/cmds/am/src/com/android/commands/am/
DInstrument.java563 int amt; in readLogcat() local
564 while ((amt = reader.read(buffer, 0, buffer.length)) >= 0) { in readLogcat()
565 if (amt > 0) { in readLogcat()
566 str.append(buffer, 0, amt); in readLogcat()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiConfigStore.java531 int amt = stream.read(data, pos, data.length - pos); in readAtomicFileFully() local
532 if (amt <= 0) { in readAtomicFileFully()
535 pos += amt; in readAtomicFileFully()
/frameworks/base/tools/aapt/
DResourceTable.cpp3038 ssize_t amt = data->writeData(strFile->getData(), strFile->getSize()); in flatten() local
3040 fprintf(stderr, "**** type strings: %zd\n", amt); in flatten()
3042 strAmt += amt; in flatten()
3043 if (amt < 0) { in flatten()
3044 return amt; in flatten()
3048 amt = data->writeData(strFile->getData(), strFile->getSize()); in flatten()
3050 fprintf(stderr, "**** key strings: %zd\n", amt); in flatten()
3052 strAmt += amt; in flatten()
3053 if (amt < 0) { in flatten()
3054 return amt; in flatten()
[all …]

12