/*
- * volume_id - reads filesystem label and uuid
+ * volume_id - reads volume label and uuid
*
* Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
*
#include <fcntl.h>
#include <sys/stat.h>
-#include "volume_id.h"
-#include "logging.h"
+#include "libvolume_id.h"
#include "util.h"
+/* the user can overwrite this log function */
+static void default_log(int priority, const char *file, int line, const char *format, ...)
+{
+ return;
+}
+
+volume_id_log_fn volume_id_log = default_log;
int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size)
{
if (volume_id_probe_vxfs(id, off) == 0)
goto found;
+ if (volume_id_probe_squashfs(id, off) == 0)
+ goto found;
+
return -1;
found:
volume_id_free_buffer(id);
- if (id->partitions != NULL)
- free(id->partitions);
-
free(id);
}