X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Ffind.h;h=ac97c3af9562d42247dc8d871d5f2546c81a934f;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=2fd5ed673c518ecf5eedad0ca4130a132e63f800;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda diff --git a/server-src/find.h b/server-src/find.h index 2fd5ed6..ac97c3a 100644 --- a/server-src/find.h +++ b/server-src/find.h @@ -3,18 +3,25 @@ #include "diskfile.h" -#define DEFAULT_SORT_ORDER "hkdlpbf" +#define DEFAULT_SORT_ORDER "hkdlpbfw" typedef struct find_result_s { struct find_result_s *next; - char *timestamp; + char *timestamp; /* dump timestamp */ + char *write_timestamp; char *hostname; char *diskname; int level; - char *label; + char *label; /* holding filename for holding files */ off_t filenum; - char *status; - char *partnum; + char *status; /* status of the part */ + char *dump_status; /* status of the dump; should be identical for all parts in dump */ + char *message; /* reason for dump_status; should be identical for all parts in dump */ + int partnum; /* -1 for holding files */ + int totalparts; /* -1 for holding files */ + double sec; /* may be 0.0 for older log files or holding files */ + off_t kb; /* may be 0 for older log files, can be compressed */ + off_t orig_kb; /* native size */ void *user_ptr; } find_result_t; @@ -40,6 +47,9 @@ find_result_t *dump_exist(find_result_t *output_find, char *hostname, find_result_t *dumps_match(find_result_t *output_find, char *hostname, char *diskname, char *datestamp, char *level, int ok); +find_result_t *dumps_match_dumpspecs(find_result_t *output_find, + GSList *dumpspecs, + int ok); /* This function looks in a particular log.xxx file for dumps. Returns TRUE * if something was found. This function also skips dumps whose disklist @@ -57,4 +67,17 @@ find_result_t *dumps_match(find_result_t *output_find, char *hostname, gboolean search_logfile(find_result_t **output_find, const char *volume_label, const char *log_datestamp, const char *logfile, disklist_t * dynamic_disklist); + +/* return all dumps on holding disk; not really a search at all. + * + * * output_find : Put found dumps here. + * * dynamic_disklist : If not NULL, adds disks not already in the global + * disklist to the given disklist (and the global one). + * If dynamic_disklist is NULL, skips disks not in the + * global disklist. + */ +void search_holding_disk( + find_result_t **output_find, + disklist_t * dynamic_disklist); + #endif /* !FIND_H */