mirror of
https://github.com/fscotto/fsnap.git
synced 2026-11-26 03:09:51 +00:00
15 lines
331 B
C
15 lines
331 B
C
#include "list.h"
|
|
#include "snapshot.h"
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
|
|
int list(const char *snapshot) {
|
|
struct RecordObject **records = NULL;
|
|
int count = 0;
|
|
int rc = snapshot_load(snapshot, &records, &count);
|
|
const int saved_errno = errno;
|
|
snapshot_release(records, count);
|
|
errno = saved_errno;
|
|
return rc;
|
|
}
|