Lines Matching refs:bytesLeft
224 int bytesLeft; in write_update_file() local
238 bytesLeft = fileSize + sizeof(metadata); in write_update_file()
239 err = dataStream->WriteEntityHeader(key, bytesLeft); in write_update_file()
254 bytesLeft -= sizeof(metadata); // bytesLeft should == fileSize now in write_update_file()
257 while ((amt = read(fd, buf, bufsize)) != 0 && bytesLeft > 0) { in write_update_file()
258 bytesLeft -= amt; in write_update_file()
259 if (bytesLeft < 0) { in write_update_file()
260 amt += bytesLeft; // Plus a negative is minus. Don't write more than we promised. in write_update_file()
268 if (bytesLeft != 0) { in write_update_file()
269 if (bytesLeft > 0) { in write_update_file()
273 while (bytesLeft > 0) { in write_update_file()
274 amt = bytesLeft < bufsize ? bytesLeft : bufsize; in write_update_file()
275 bytesLeft -= amt; in write_update_file()
284 " You aren't doing proper locking!", realFilename, fileSize, fileSize-bytesLeft); in write_update_file()