| 6954 | *--------------------------------------------------------------------------- */ |
| 6955 | |
| 6956 | static void scanMode(void) { |
| 6957 | redisReply *reply; |
| 6958 | unsigned long long cur = 0; |
| 6959 | |
| 6960 | do { |
| 6961 | reply = sendScan(&cur); |
| 6962 | for (unsigned int j = 0; j < reply->element[1]->elements; j++) { |
| 6963 | if (config.output == OUTPUT_STANDARD) { |
| 6964 | sds out = sdscatrepr(sdsempty(), reply->element[1]->element[j]->str, |
| 6965 | reply->element[1]->element[j]->len); |
| 6966 | printf("%s\n", out); |
| 6967 | sdsfree(out); |
| 6968 | } else { |
| 6969 | printf("%s\n", reply->element[1]->element[j]->str); |
| 6970 | } |
| 6971 | } |
| 6972 | freeReplyObject(reply); |
| 6973 | } while(cur != 0); |
| 6974 | |
| 6975 | exit(0); |
| 6976 | } |
| 6977 | |
| 6978 | /*------------------------------------------------------------------------------ |
| 6979 | * LRU test mode |
no test coverage detected