- if (ret <= 0)
- return 1;
- if (s.creation_time > esd->snap.creation_time)
- return 1;
- free(esd->snap.name);
- esd->snap = s;
- return 1;
-}
-
-int remove_oldest_snapshot()
-{
- int ret;
- struct edge_snapshot_data esd = {
- .now = get_current_time(),
- .snap = {.creation_time = LLONG_MAX}
- };
- for_each_subdir(get_oldest, &esd);
- if (!esd.snap.name) /* no snapshot found */