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,
43 find_result_t *dumps_match_dumpspecs(find_result_t *output_find,
47 /* This function looks in a particular log.xxx file for dumps. Returns TRUE
48 * if something was found. This function also skips dumps whose disklist
49 * entries are not marked 'todo'.
50 * * output_find : Put found dumps here.
51 * * volume_label : If not NULL, restrict the search to
52 * dumps matching the given volume details.
53 * * log_datestamp : If not NULL, checks that this logfile is from this time.
54 * * logfile : Name of logfile in config dir.
55 * * dynamic_disklist : If not NULL, adds disks not already in the global
56 * disklist to the given disklist (and the global one).
57 * If dynamic_disklist is NULL, skips disks not in the
60 gboolean search_logfile(find_result_t **output_find, const char *volume_label,
61 const char *log_datestamp, const char *logfile,
62 disklist_t * dynamic_disklist);