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