From: Karel Zak Date: Tue, 9 Sep 2008 10:44:57 +0000 (+0200) Subject: blkid: correctly initialize magics[] arrays X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=288c2da13380ca2700d4be46b1157eff0a0741e8;p=util-linux blkid: correctly initialize magics[] arrays Signed-off-by: Karel Zak --- diff --git a/libs/blkid/src/blkidP.h b/libs/blkid/src/blkidP.h index acd10d4e..98fb7ff6 100644 --- a/libs/blkid/src/blkidP.h +++ b/libs/blkid/src/blkidP.h @@ -136,6 +136,8 @@ struct blkid_idinfo struct blkid_idmag magics[]; /* NULL or array with magic strings */ }; +#define BLKID_NONE_MAGIC {{ NULL }} + /* * Minimum number of seconds between device probes, even when reading * from the cache. This is to avoid re-probing all devices which were diff --git a/libs/blkid/src/probers/adaptec_raid.c b/libs/blkid/src/probers/adaptec_raid.c index 2bce73e6..ccf56ddf 100644 --- a/libs/blkid/src/probers/adaptec_raid.c +++ b/libs/blkid/src/probers/adaptec_raid.c @@ -109,7 +109,8 @@ static int probe_adraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo adraid_idinfo = { .name = "adaptec_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_adraid + .probefunc = probe_adraid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/ddf_raid.c b/libs/blkid/src/probers/ddf_raid.c index 5c6f6522..894c73be 100644 --- a/libs/blkid/src/probers/ddf_raid.c +++ b/libs/blkid/src/probers/ddf_raid.c @@ -58,7 +58,8 @@ static int probe_ddf(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo ddfraid_idinfo = { .name = "ddf_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_ddf + .probefunc = probe_ddf, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/isw_raid.c b/libs/blkid/src/probers/isw_raid.c index 968d5cb3..a08a4599 100644 --- a/libs/blkid/src/probers/isw_raid.c +++ b/libs/blkid/src/probers/isw_raid.c @@ -62,7 +62,8 @@ static int probe_iswraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo iswraid_idinfo = { .name = "isw_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_iswraid + .probefunc = probe_iswraid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/jmicron_raid.c b/libs/blkid/src/probers/jmicron_raid.c index 01fe60db..fb12077c 100644 --- a/libs/blkid/src/probers/jmicron_raid.c +++ b/libs/blkid/src/probers/jmicron_raid.c @@ -60,7 +60,8 @@ static int probe_jmraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo jmraid_idinfo = { .name = "jmicron_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_jmraid + .probefunc = probe_jmraid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/linux_raid.c b/libs/blkid/src/probers/linux_raid.c index 41be8b76..163c770d 100644 --- a/libs/blkid/src/probers/linux_raid.c +++ b/libs/blkid/src/probers/linux_raid.c @@ -159,7 +159,8 @@ int probe_raid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo linuxraid_idinfo = { .name = "linux_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_raid + .probefunc = probe_raid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/lsi_raid.c b/libs/blkid/src/probers/lsi_raid.c index fe03dc5d..207ed849 100644 --- a/libs/blkid/src/probers/lsi_raid.c +++ b/libs/blkid/src/probers/lsi_raid.c @@ -50,7 +50,8 @@ static int probe_lsiraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo lsiraid_idinfo = { .name = "lsi_mega_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_lsiraid + .probefunc = probe_lsiraid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/nvidia_raid.c b/libs/blkid/src/probers/nvidia_raid.c index cf03a033..654fd7d0 100644 --- a/libs/blkid/src/probers/nvidia_raid.c +++ b/libs/blkid/src/probers/nvidia_raid.c @@ -57,7 +57,8 @@ static int probe_nvraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo nvraid_idinfo = { .name = "nvidia_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_nvraid + .probefunc = probe_nvraid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/promise_raid.c b/libs/blkid/src/probers/promise_raid.c index c11ddd35..e3c1b63e 100644 --- a/libs/blkid/src/probers/promise_raid.c +++ b/libs/blkid/src/probers/promise_raid.c @@ -60,7 +60,8 @@ static int probe_pdcraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo pdcraid_idinfo = { .name = "promise_fasttrack_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_pdcraid + .probefunc = probe_pdcraid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/silicon_raid.c b/libs/blkid/src/probers/silicon_raid.c index 1af920a8..d800d67a 100644 --- a/libs/blkid/src/probers/silicon_raid.c +++ b/libs/blkid/src/probers/silicon_raid.c @@ -74,7 +74,8 @@ static int probe_silraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo silraid_idinfo = { .name = "silicon_medley_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_silraid + .probefunc = probe_silraid, + .magics = BLKID_NONE_MAGIC }; diff --git a/libs/blkid/src/probers/via_raid.c b/libs/blkid/src/probers/via_raid.c index 2a2557ca..cb9058da 100644 --- a/libs/blkid/src/probers/via_raid.c +++ b/libs/blkid/src/probers/via_raid.c @@ -77,7 +77,8 @@ static int probe_viaraid(blkid_probe pr, const struct blkid_idmag *mag) const struct blkid_idinfo viaraid_idinfo = { .name = "via_raid_member", .usage = BLKID_USAGE_RAID, - .probefunc = probe_viaraid + .probefunc = probe_viaraid, + .magics = BLKID_NONE_MAGIC };