6 #define DEFAULT_SORT_ORDER "hkdlpbfw"
8 typedef struct find_result_s {
9 struct find_result_s *next;
18 double sec; /* may be 0.0 for older log files or holding files */
19 size_t kb; /* may be 0 for older log files or holding files */
23 /* Finds /all/ dumps still on a volume. If diskqp is not NULL, then dumps
24 * not matching any existing disklist entry will be added to diskqp and to
25 * the global disklist. If diskqp is NULL, disks not matching existing
26 * disklist entries will be skipped. See search_logfile below, which does
27 * the dirty work for find_dump. */
28 find_result_t *find_dump(disklist_t* diskqp);
30 /* Return a list of unqualified filenames of logfiles for active
31 * tapes. Filenames are relative to the logdir.
33 * @returns: dynamically allocated, null-terminated strv
35 char **find_log(void);
37 void sort_find_result(char *sort_order, find_result_t **output_find);
38 void print_find_result(find_result_t *output_find);
39 void free_find_result(find_result_t **output_find);
40 find_result_t *dump_exist(find_result_t *output_find, char *hostname,
41 char *diskname, char *datestamp, int level);
42 find_result_t *dumps_match(find_result_t *output_find, char *hostname,
43 char *diskname, char *datestamp, char *level,
45 find_result_t *dumps_match_dumpspecs(find_result_t *output_find,
49 /* This function looks in a particular log.xxx file for dumps. Returns TRUE
50 * if something was found. This function also skips dumps whose disklist
51 * entries are not marked 'todo'.
52 * * output_find : Put found dumps here.
53 * * volume_label : If not NULL, restrict the search to
54 * dumps matching the given volume details.
55 * * log_datestamp : If not NULL, checks that this logfile is from this time.
56 * * logfile : Name of logfile in config dir.
57 * * dynamic_disklist : If not NULL, adds disks not already in the global
58 * disklist to the given disklist (and the global one).
59 * If dynamic_disklist is NULL, skips disks not in the
62 gboolean search_logfile(find_result_t **output_find, const char *volume_label,
63 const char *log_datestamp, const char *logfile,
64 disklist_t * dynamic_disklist);