Lines Matching refs:buf

64     char buf[AOF_RW_BUF_BLOCK_SIZE];  member
114 block->buf,block->used); in aofChildWriteDiffData()
116 memmove(block->buf,block->buf+nwritten,block->used-nwritten); in aofChildWriteDiffData()
134 memcpy(block->buf+block->used, s, thislen); in aofRewriteBufferAppend()
184 nwritten = write(fd,block->buf,block->used); in aofRewriteBufferWrite()
450 char buf[32]; in catAppendOnlyGenericCommand() local
454 buf[0] = '*'; in catAppendOnlyGenericCommand()
455 len = 1+ll2string(buf+1,sizeof(buf)-1,argc); in catAppendOnlyGenericCommand()
456 buf[len++] = '\r'; in catAppendOnlyGenericCommand()
457 buf[len++] = '\n'; in catAppendOnlyGenericCommand()
458 dst = sdscatlen(dst,buf,len); in catAppendOnlyGenericCommand()
462 buf[0] = '$'; in catAppendOnlyGenericCommand()
463 len = 1+ll2string(buf+1,sizeof(buf)-1,sdslen(o->ptr)); in catAppendOnlyGenericCommand()
464 buf[len++] = '\r'; in catAppendOnlyGenericCommand()
465 buf[len++] = '\n'; in catAppendOnlyGenericCommand()
466 dst = sdscatlen(dst,buf,len); in catAppendOnlyGenericCommand()
481 sds catAppendOnlyExpireAtCommand(sds buf, struct redisCommand *cmd, robj *key, robj *seconds) { in catAppendOnlyExpireAtCommand() argument
505 buf = catAppendOnlyGenericCommand(buf, 3, argv); in catAppendOnlyExpireAtCommand()
508 return buf; in catAppendOnlyExpireAtCommand()
512 sds buf = sdsempty(); in feedAppendOnlyFile() local
521 buf = sdscatprintf(buf,"*2\r\n$6\r\nSELECT\r\n$%lu\r\n%s\r\n", in feedAppendOnlyFile()
529 buf = catAppendOnlyExpireAtCommand(buf,cmd,argv[1],argv[2]); in feedAppendOnlyFile()
535 buf = catAppendOnlyGenericCommand(buf,3,tmpargv); in feedAppendOnlyFile()
537 buf = catAppendOnlyExpireAtCommand(buf,cmd,argv[1],argv[2]); in feedAppendOnlyFile()
542 buf = catAppendOnlyGenericCommand(buf,argc,argv); in feedAppendOnlyFile()
549 server.aof_buf = sdscatlen(server.aof_buf,buf,sdslen(buf)); in feedAppendOnlyFile()
556 aofRewriteBufferAppend((unsigned char*)buf,sdslen(buf)); in feedAppendOnlyFile()
558 sdsfree(buf); in feedAppendOnlyFile()
643 char buf[128]; in loadAppendOnlyFile() local
653 if (fgets(buf,sizeof(buf),fp) == NULL) { in loadAppendOnlyFile()
659 if (buf[0] != '*') goto fmterr; in loadAppendOnlyFile()
660 if (buf[1] == '\0') goto readerr; in loadAppendOnlyFile()
661 argc = atoi(buf+1); in loadAppendOnlyFile()
669 if (fgets(buf,sizeof(buf),fp) == NULL) { in loadAppendOnlyFile()
674 if (buf[0] != '$') goto fmterr; in loadAppendOnlyFile()
675 len = strtol(buf+1,NULL,10); in loadAppendOnlyFile()
684 if (fread(buf,2,1,fp) == 0) { in loadAppendOnlyFile()
997 char buf[65536]; /* Default pipe buffer size on most Linux systems. */ in aofReadDiffFromParent() local
1001 read(server.aof_pipe_read_data_from_parent,buf,sizeof(buf))) > 0) { in aofReadDiffFromParent()
1002 server.aof_child_diff = sdscatlen(server.aof_child_diff,buf,nread); in aofReadDiffFromParent()