MCPcopy Create free account
hub / github.com/F-Stack/f-stack / scanMode

Function scanMode

app/redis-6.2.6/src/redis-cli.c:8070–8090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8068 *--------------------------------------------------------------------------- */
8069
8070static void scanMode(void) {
8071 redisReply *reply;
8072 unsigned long long cur = 0;
8073
8074 do {
8075 reply = sendScan(&cur);
8076 for (unsigned int j = 0; j < reply->element[1]->elements; j++) {
8077 if (config.output == OUTPUT_STANDARD) {
8078 sds out = sdscatrepr(sdsempty(), reply->element[1]->element[j]->str,
8079 reply->element[1]->element[j]->len);
8080 printf("%s\n", out);
8081 sdsfree(out);
8082 } else {
8083 printf("%s\n", reply->element[1]->element[j]->str);
8084 }
8085 }
8086 freeReplyObject(reply);
8087 } while(cur != 0);
8088
8089 exit(0);
8090}
8091
8092/*------------------------------------------------------------------------------
8093 * LRU test mode

Callers 1

mainFunction · 0.85

Calls 6

sendScanFunction · 0.85
sdscatreprFunction · 0.85
sdsemptyFunction · 0.85
sdsfreeFunction · 0.85
freeReplyObjectFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected