Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <string.h> |
| 4 | |
| 5 | #include "../fio.h" |
| 6 | #include "../gettime.h" |
Danny Al-Gaaf | 9e52966 | 2014-04-30 20:48:16 +0200 | [diff] [blame] | 7 | #include "../fio_time.h" |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 8 | #include "../verify.h" |
| 9 | |
| 10 | #include "../crc/md5.h" |
| 11 | #include "../crc/crc64.h" |
| 12 | #include "../crc/crc32.h" |
| 13 | #include "../crc/crc32c.h" |
| 14 | #include "../crc/crc16.h" |
| 15 | #include "../crc/crc7.h" |
| 16 | #include "../crc/sha1.h" |
| 17 | #include "../crc/sha256.h" |
| 18 | #include "../crc/sha512.h" |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 19 | #include "../crc/xxhash.h" |
Jens Axboe | b0e1bb9 | 2014-09-27 09:30:56 -0600 | [diff] [blame] | 20 | #include "../crc/murmur3.h" |
Jens Axboe | 262cf5c | 2014-09-27 21:27:48 -0600 | [diff] [blame] | 21 | #include "../crc/fnv.h" |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 22 | #include "../hash.h" |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 23 | |
Jens Axboe | ea1f1da | 2014-04-02 20:03:32 -0600 | [diff] [blame] | 24 | #include "test.h" |
| 25 | |
Jens Axboe | f754086 | 2014-02-07 20:52:32 -0700 | [diff] [blame] | 26 | #define CHUNK 131072U |
| 27 | #define NR_CHUNKS 2048U |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 28 | |
| 29 | struct test_type { |
| 30 | const char *name; |
| 31 | unsigned int mask; |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 32 | void (*fn)(struct test_type *, void *, size_t); |
| 33 | uint32_t output; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | enum { |
| 37 | T_MD5 = 1U << 0, |
| 38 | T_CRC64 = 1U << 1, |
| 39 | T_CRC32 = 1U << 2, |
| 40 | T_CRC32C = 1U << 3, |
| 41 | T_CRC16 = 1U << 4, |
| 42 | T_CRC7 = 1U << 5, |
| 43 | T_SHA1 = 1U << 6, |
| 44 | T_SHA256 = 1U << 7, |
| 45 | T_SHA512 = 1U << 8, |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 46 | T_XXHASH = 1U << 9, |
Jens Axboe | 67c1b7c | 2014-09-27 08:38:42 -0600 | [diff] [blame] | 47 | T_MURMUR3 = 1U << 10, |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 48 | T_JHASH = 1U << 11, |
Jens Axboe | 262cf5c | 2014-09-27 21:27:48 -0600 | [diff] [blame] | 49 | T_FNV = 1U << 12, |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 50 | }; |
| 51 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 52 | static void t_md5(struct test_type *t, void *buf, size_t size) |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 53 | { |
| 54 | uint32_t digest[4]; |
| 55 | struct fio_md5_ctx ctx = { .hash = digest }; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 56 | int i; |
| 57 | |
| 58 | fio_md5_init(&ctx); |
| 59 | |
Jens Axboe | fc18c78 | 2014-09-27 14:13:58 -0600 | [diff] [blame] | 60 | for (i = 0; i < NR_CHUNKS; i++) { |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 61 | fio_md5_update(&ctx, buf, size); |
Jens Axboe | fc18c78 | 2014-09-27 14:13:58 -0600 | [diff] [blame] | 62 | fio_md5_final(&ctx); |
| 63 | } |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 64 | } |
| 65 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 66 | static void t_crc64(struct test_type *t, void *buf, size_t size) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 67 | { |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 68 | int i; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 69 | |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 70 | for (i = 0; i < NR_CHUNKS; i++) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 71 | fio_crc64(buf, size); |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 72 | } |
| 73 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 74 | static void t_crc32(struct test_type *t, void *buf, size_t size) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 75 | { |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 76 | int i; |
| 77 | |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 78 | for (i = 0; i < NR_CHUNKS; i++) |
| 79 | fio_crc32(buf, size); |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 80 | } |
| 81 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 82 | static void t_crc32c(struct test_type *t, void *buf, size_t size) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 83 | { |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 84 | int i; |
| 85 | |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 86 | for (i = 0; i < NR_CHUNKS; i++) |
| 87 | fio_crc32c(buf, size); |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 88 | } |
| 89 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 90 | static void t_crc16(struct test_type *t, void *buf, size_t size) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 91 | { |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 92 | int i; |
| 93 | |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 94 | for (i = 0; i < NR_CHUNKS; i++) |
| 95 | fio_crc16(buf, size); |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 96 | } |
| 97 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 98 | static void t_crc7(struct test_type *t, void *buf, size_t size) |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 99 | { |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 100 | int i; |
| 101 | |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 102 | for (i = 0; i < NR_CHUNKS; i++) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 103 | fio_crc7(buf, size); |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 104 | } |
| 105 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 106 | static void t_sha1(struct test_type *t, void *buf, size_t size) |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 107 | { |
| 108 | uint32_t sha[5]; |
| 109 | struct fio_sha1_ctx ctx = { .H = sha }; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 110 | int i; |
| 111 | |
| 112 | fio_sha1_init(&ctx); |
| 113 | |
Jens Axboe | bf2d816 | 2015-01-16 16:10:43 -0700 | [diff] [blame^] | 114 | for (i = 0; i < NR_CHUNKS; i++) { |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 115 | fio_sha1_update(&ctx, buf, size); |
Jens Axboe | bf2d816 | 2015-01-16 16:10:43 -0700 | [diff] [blame^] | 116 | fio_sha1_final(&ctx); |
| 117 | } |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 118 | } |
| 119 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 120 | static void t_sha256(struct test_type *t, void *buf, size_t size) |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 121 | { |
| 122 | uint8_t sha[64]; |
| 123 | struct fio_sha256_ctx ctx = { .buf = sha }; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 124 | int i; |
| 125 | |
| 126 | fio_sha256_init(&ctx); |
| 127 | |
Jens Axboe | fc18c78 | 2014-09-27 14:13:58 -0600 | [diff] [blame] | 128 | for (i = 0; i < NR_CHUNKS; i++) { |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 129 | fio_sha256_update(&ctx, buf, size); |
Jens Axboe | fc18c78 | 2014-09-27 14:13:58 -0600 | [diff] [blame] | 130 | fio_sha256_final(&ctx); |
| 131 | } |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 132 | } |
| 133 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 134 | static void t_sha512(struct test_type *t, void *buf, size_t size) |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 135 | { |
| 136 | uint8_t sha[128]; |
| 137 | struct fio_sha512_ctx ctx = { .buf = sha }; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 138 | int i; |
| 139 | |
| 140 | fio_sha512_init(&ctx); |
| 141 | |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 142 | for (i = 0; i < NR_CHUNKS; i++) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 143 | fio_sha512_update(&ctx, buf, size); |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 144 | } |
| 145 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 146 | static void t_murmur3(struct test_type *t, void *buf, size_t size) |
Jens Axboe | 67c1b7c | 2014-09-27 08:38:42 -0600 | [diff] [blame] | 147 | { |
| 148 | int i; |
| 149 | |
| 150 | for (i = 0; i < NR_CHUNKS; i++) |
| 151 | murmurhash3(buf, size, 0x8989); |
| 152 | } |
| 153 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 154 | static void t_jhash(struct test_type *t, void *buf, size_t size) |
| 155 | { |
| 156 | int i; |
| 157 | |
| 158 | for (i = 0; i < NR_CHUNKS; i++) |
| 159 | t->output += jhash(buf, size, 0x8989); |
| 160 | } |
| 161 | |
Jens Axboe | 262cf5c | 2014-09-27 21:27:48 -0600 | [diff] [blame] | 162 | static void t_fnv(struct test_type *t, void *buf, size_t size) |
| 163 | { |
| 164 | int i; |
| 165 | |
| 166 | for (i = 0; i < NR_CHUNKS; i++) |
| 167 | t->output += fnv(buf, size, 0x8989); |
| 168 | } |
| 169 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 170 | static void t_xxhash(struct test_type *t, void *buf, size_t size) |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 171 | { |
| 172 | void *state; |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 173 | int i; |
| 174 | |
| 175 | state = XXH32_init(0x8989); |
| 176 | |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 177 | for (i = 0; i < NR_CHUNKS; i++) |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 178 | XXH32_update(state, buf, size); |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 179 | |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 180 | t->output = XXH32_digest(state); |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 181 | } |
| 182 | |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 183 | static struct test_type t[] = { |
| 184 | { |
| 185 | .name = "md5", |
| 186 | .mask = T_MD5, |
| 187 | .fn = t_md5, |
| 188 | }, |
| 189 | { |
| 190 | .name = "crc64", |
| 191 | .mask = T_CRC64, |
| 192 | .fn = t_crc64, |
| 193 | }, |
| 194 | { |
| 195 | .name = "crc32", |
| 196 | .mask = T_CRC32, |
| 197 | .fn = t_crc32, |
| 198 | }, |
| 199 | { |
| 200 | .name = "crc32c", |
| 201 | .mask = T_CRC32C, |
| 202 | .fn = t_crc32c, |
| 203 | }, |
| 204 | { |
| 205 | .name = "crc16", |
| 206 | .mask = T_CRC16, |
| 207 | .fn = t_crc16, |
| 208 | }, |
| 209 | { |
| 210 | .name = "crc7", |
| 211 | .mask = T_CRC7, |
| 212 | .fn = t_crc7, |
| 213 | }, |
| 214 | { |
| 215 | .name = "sha1", |
| 216 | .mask = T_SHA1, |
| 217 | .fn = t_sha1, |
| 218 | }, |
| 219 | { |
| 220 | .name = "sha256", |
| 221 | .mask = T_SHA256, |
| 222 | .fn = t_sha256, |
| 223 | }, |
| 224 | { |
| 225 | .name = "sha512", |
| 226 | .mask = T_SHA512, |
| 227 | .fn = t_sha512, |
| 228 | }, |
| 229 | { |
Jens Axboe | 844ea60 | 2014-02-20 13:21:45 -0800 | [diff] [blame] | 230 | .name = "xxhash", |
| 231 | .mask = T_XXHASH, |
| 232 | .fn = t_xxhash, |
| 233 | }, |
| 234 | { |
Jens Axboe | 67c1b7c | 2014-09-27 08:38:42 -0600 | [diff] [blame] | 235 | .name = "murmur3", |
| 236 | .mask = T_MURMUR3, |
| 237 | .fn = t_murmur3, |
| 238 | }, |
| 239 | { |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 240 | .name = "jhash", |
| 241 | .mask = T_JHASH, |
| 242 | .fn = t_jhash, |
| 243 | }, |
| 244 | { |
Jens Axboe | 262cf5c | 2014-09-27 21:27:48 -0600 | [diff] [blame] | 245 | .name = "fnv", |
| 246 | .mask = T_FNV, |
| 247 | .fn = t_fnv, |
| 248 | }, |
| 249 | { |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 250 | .name = NULL, |
| 251 | }, |
| 252 | }; |
| 253 | |
| 254 | static unsigned int get_test_mask(const char *type) |
| 255 | { |
| 256 | char *ostr, *str = strdup(type); |
| 257 | unsigned int mask; |
| 258 | char *name; |
| 259 | int i; |
| 260 | |
| 261 | ostr = str; |
| 262 | mask = 0; |
| 263 | while ((name = strsep(&str, ",")) != NULL) { |
| 264 | for (i = 0; t[i].name; i++) { |
Jens Axboe | f754086 | 2014-02-07 20:52:32 -0700 | [diff] [blame] | 265 | if (!strcmp(t[i].name, name)) { |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 266 | mask |= t[i].mask; |
| 267 | break; |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | free(ostr); |
| 273 | return mask; |
| 274 | } |
| 275 | |
Jens Axboe | 782744e | 2014-02-07 20:54:39 -0700 | [diff] [blame] | 276 | static int list_types(void) |
| 277 | { |
| 278 | int i; |
| 279 | |
| 280 | for (i = 0; t[i].name; i++) |
| 281 | printf("%s\n", t[i].name); |
| 282 | |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 283 | return 1; |
Jens Axboe | 782744e | 2014-02-07 20:54:39 -0700 | [diff] [blame] | 284 | } |
| 285 | |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 286 | int fio_crctest(const char *type) |
| 287 | { |
| 288 | unsigned int test_mask = 0; |
| 289 | uint64_t mb = CHUNK * NR_CHUNKS; |
Jens Axboe | f888971 | 2014-07-25 15:15:46 +0200 | [diff] [blame] | 290 | struct frand_state state; |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 291 | int i, first = 1; |
| 292 | void *buf; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 293 | |
| 294 | crc32c_intel_probe(); |
| 295 | |
| 296 | if (!type) |
| 297 | test_mask = ~0U; |
Jens Axboe | 782744e | 2014-02-07 20:54:39 -0700 | [diff] [blame] | 298 | else if (!strcmp(type, "help") || !strcmp(type, "list")) |
| 299 | return list_types(); |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 300 | else |
| 301 | test_mask = get_test_mask(type); |
| 302 | |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 303 | if (!test_mask) { |
| 304 | fprintf(stderr, "fio: unknown hash `%s`. Available:\n", type); |
| 305 | return list_types(); |
| 306 | } |
| 307 | |
| 308 | buf = malloc(CHUNK); |
Jens Axboe | f888971 | 2014-07-25 15:15:46 +0200 | [diff] [blame] | 309 | init_rand_seed(&state, 0x8989); |
| 310 | fill_random_buf(&state, buf, CHUNK); |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 311 | |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 312 | for (i = 0; t[i].name; i++) { |
Jens Axboe | f888971 | 2014-07-25 15:15:46 +0200 | [diff] [blame] | 313 | struct timeval tv; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 314 | double mb_sec; |
| 315 | uint64_t usec; |
Jens Axboe | 3e6d415 | 2014-09-27 08:43:27 -0600 | [diff] [blame] | 316 | char pre[3]; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 317 | |
| 318 | if (!(t[i].mask & test_mask)) |
| 319 | continue; |
| 320 | |
Jens Axboe | f888971 | 2014-07-25 15:15:46 +0200 | [diff] [blame] | 321 | /* |
| 322 | * For first run, make sure CPUs are spun up and that |
| 323 | * we've touched the data. |
| 324 | */ |
| 325 | if (first) { |
| 326 | usec_spin(100000); |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 327 | t[i].fn(&t[i], buf, CHUNK); |
Jens Axboe | f888971 | 2014-07-25 15:15:46 +0200 | [diff] [blame] | 328 | } |
| 329 | |
| 330 | fio_gettime(&tv, NULL); |
Jens Axboe | 95a5a3f | 2014-09-27 09:29:42 -0600 | [diff] [blame] | 331 | t[i].fn(&t[i], buf, CHUNK); |
Jens Axboe | f888971 | 2014-07-25 15:15:46 +0200 | [diff] [blame] | 332 | usec = utime_since_now(&tv); |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 333 | |
Jens Axboe | 7b3aea9 | 2014-10-14 19:47:41 -0600 | [diff] [blame] | 334 | if (usec) { |
| 335 | mb_sec = (double) mb / (double) usec; |
| 336 | mb_sec /= (1.024 * 1.024); |
| 337 | if (strlen(t[i].name) >= 7) |
| 338 | sprintf(pre, "\t"); |
| 339 | else |
| 340 | sprintf(pre, "\t\t"); |
| 341 | printf("%s:%s%8.2f MB/sec\n", t[i].name, pre, mb_sec); |
| 342 | } else |
| 343 | printf("%s:inf MB/sec\n", t[i].name); |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 344 | first = 0; |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 345 | } |
Jens Axboe | 782744e | 2014-02-07 20:54:39 -0700 | [diff] [blame] | 346 | |
Jens Axboe | 7e92c71 | 2014-07-25 10:12:26 +0200 | [diff] [blame] | 347 | free(buf); |
Jens Axboe | fec0f21 | 2014-02-07 14:39:33 -0700 | [diff] [blame] | 348 | return 0; |
| 349 | } |