Lines Matching defs:amt

89     int amt;
92 amt = read(fd, &header, sizeof(header));
93 if (amt != sizeof(header)) {
96 bytesRead += amt;
107 amt = read(fd, &file, sizeof(FileState));
108 if (amt != sizeof(FileState)) {
112 bytesRead += amt;
119 amt = read(fd, filename, nameBufSize);
120 if (amt == nameBufSize) {
123 bytesRead += amt;
127 if (amt != nameBufSize) {
160 int amt;
163 amt = write(fd, &header, sizeof(header));
164 if (amt != sizeof(header)) {
175 amt = write(fd, &r.s, sizeof(FileState));
176 if (amt != sizeof(FileState)) {
182 amt = write(fd, name.string(), nameLen);
183 if (amt != nameLen) {
190 amt = write(fd, &padding, paddingLen);
191 if (amt != paddingLen) {
218 int amt;
251 while ((amt = read(fd, buf, bufsize)) != 0 && bytesLeft > 0) {
252 bytesLeft -= amt;
254 amt += bytesLeft; // Plus a negative is minus. Don't write more than we promised.
256 err = dataStream->WriteEntityData(buf, amt);
268 amt = bytesLeft < bufsize ? bytesLeft : bufsize;
269 bytesLeft -= amt;
270 err = dataStream->WriteEntityData(buf, amt);
314 int amt;
321 while ((amt = read(fd, buf, bufsize)) != 0) {
322 crc = crc32(crc, (Bytef*)buf, amt);
749 ssize_t amt;
763 amt = in->ReadEntityData(&metadata, sizeof(metadata));
764 if (amt != sizeof(metadata)) {
766 (long)amt, strerror(errno));
788 while ((amt = in->ReadEntityData(buf, RESTORE_BUF_SIZE)) > 0) {
789 err = write(fd, buf, amt);
790 if (err != amt) {
795 crc = crc32(crc, (Bytef*)buf, amt);
834 int amt;
845 amt = write(fd, data, len);
846 if (amt != len) {
860 int amt;
875 amt = lseek(fd, 0, SEEK_END);
876 if (amt != len) {
877 fprintf(stderr, "compare_file file length should be %d, was %d\n", len, amt);
882 int readLen = amt < len ? amt : len;
883 amt = read(fd, contents, readLen);
884 if (amt != readLen) {
885 fprintf(stderr, "compare_file read expected %d bytes but got %d\n", len, amt);