Lines Matching refs:bytesLeft
220 int bytesLeft; in write_update_file() local
232 bytesLeft = fileSize + sizeof(metadata); in write_update_file()
233 err = dataStream->WriteEntityHeader(key, bytesLeft); in write_update_file()
248 bytesLeft -= sizeof(metadata); // bytesLeft should == fileSize now in write_update_file()
251 while ((amt = read(fd, buf, bufsize)) != 0 && bytesLeft > 0) { in write_update_file()
252 bytesLeft -= amt; in write_update_file()
253 if (bytesLeft < 0) { in write_update_file()
254 amt += bytesLeft; // Plus a negative is minus. Don't write more than we promised. in write_update_file()
262 if (bytesLeft != 0) { in write_update_file()
263 if (bytesLeft > 0) { in write_update_file()
267 while (bytesLeft > 0) { in write_update_file()
268 amt = bytesLeft < bufsize ? bytesLeft : bufsize; in write_update_file()
269 bytesLeft -= amt; in write_update_file()
278 " You aren't doing proper locking!", realFilename, fileSize, fileSize-bytesLeft); in write_update_file()