Commit 09cecd82 authored by Mikhail Karpenko's avatar Mikhail Karpenko

Build file index directory instead of copying files

parent 3e396b5e
......@@ -800,6 +800,9 @@ void camogm_set_prefix(camogm_state *state, const char * p, path_type type)
} else {
D0(fprintf(debug_file, "WARNING: raw device write initiated\n"));
state->rawdev_op = 1;
/* debug code follows */
state->rawdev.end_pos = 10485760; // 10 Mib
/* end of debug code */
}
}
}
......@@ -1300,7 +1303,8 @@ int parse_cmd(camogm_state *state, FILE* npipe)
return 28;
} else if (strcmp(cmd, "rawdev_read") == 0) {
if (state->rawdev_op)
camogm_read(state);
// camogm_read(state);
build_index(state);
return 29;
}
......
This diff is collapsed.
......@@ -19,6 +19,23 @@
#include "camogm.h"
int camogm_read(camogm_state *state);
struct disk_index {
struct disk_index *next;
struct disk_index *prev;
time_t rawtime;
useconds_t usec;
uint32_t port;
size_t f_size;
uint64_t f_offset;
};
struct disk_idir {
struct disk_index *head;
struct disk_index *tail;
size_t size;
};
//int camogm_read(camogm_state *state);
int build_index(camogm_state *state);
#endif /* _CAMOGM_READ_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment