X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Fvolume_id%2Flib%2Fvolume_id.c;h=472ea246112117a4fd3ebcf70b548ad4fcb5abca;hp=073ad79c7723834e7f72291ea3557353a5466e46;hb=674e00f67c5dc4bd6e7c5aff21c11b36eb81cd75;hpb=83cc6ab4760817509f1ed1ee429669e563f82caf diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c index 073ad79c7..472ea2461 100644 --- a/extras/volume_id/lib/volume_id.c +++ b/extras/volume_id/lib/volume_id.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -35,14 +34,17 @@ static void default_log(int priority, const char *file, int line, const char *fo return; } -volume_id_log_fn volume_id_log = default_log; +volume_id_log_fn_t volume_id_log_fn = default_log; int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size) { if (id == NULL) return -EINVAL; - /* probe for raid first, cause fs probes may be successful on raid members */ + info("probing at offset 0x%llx, size 0x%llx", + (unsigned long long) off, (unsigned long long) size); + + /* probe for raid first, because fs probes may be successful on raid members */ if (size) { if (volume_id_probe_linux_raid(id, off, size) == 0) goto found; @@ -91,6 +93,9 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size if (id == NULL) return -EINVAL; + info("probing at offset 0x%llx, size 0x%llx", + (unsigned long long) off, (unsigned long long) size); + if (volume_id_probe_luks(id, off) == 0) goto found; @@ -158,6 +163,9 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size if (volume_id_probe_squashfs(id, off) == 0) goto found; + if (volume_id_probe_netware(id, off) == 0) + goto found; + return -1; found: