-/*
- * Copyright (C) 2008-2010 Andre Noll <maan@systemlinux.org>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* SPDX-License-Identifier: GPL-2.0 */
#include <stdlib.h>
#include <assert.h>
#include <inttypes.h>
#include <sys/time.h>
#include "gcc-compat.h"
-#include "error.h"
+#include "err.h"
#include "snap.h"
-#include "string.h"
-#include "time.h"
-#include "fd.h"
+#include "str.h"
+#include "tv.h"
+#include "file.h"
/**
* Wrapper for isdigit.
}
if (!strcmp(dash + 1, "incomplete.being_deleted")) {
s->completion_time = -1;
- s->flags = SS_BEING_DELETED; /* mot cpmplete, being deleted */
+ s->flags = SS_BEING_DELETED; /* not complete, being deleted */
goto success;
}
tmp = dash + 1;
return name;
}
+int num_complete_snapshots(struct snapshot_list *sl)
+{
+ struct snapshot *s;
+ int i, ret = 0;
+
+ FOR_EACH_SNAPSHOT(s, i, sl)
+ if (s->flags & SS_COMPLETE)
+ ret++;
+ return ret;
+}