summaryrefslogtreecommitdiffstats
path: root/sys/geom/raid
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-03-11 09:50:31 +0000
committermav <mav@FreeBSD.org>2015-03-11 09:50:31 +0000
commitfa6dbb5ad5277c7b4c8acbc94d1d0e7b4a4d208a (patch)
tree7d3c0896899882b99107d958756d453ae7f4dd29 /sys/geom/raid
parentbf16a17b0e25d22868969d3db7f295a10980fb5e (diff)
downloadFreeBSD-src-fa6dbb5ad5277c7b4c8acbc94d1d0e7b4a4d208a.zip
FreeBSD-src-fa6dbb5ad5277c7b4c8acbc94d1d0e7b4a4d208a.tar.gz
MFC r279278: Replace constant with proper sizeof().
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
Diffstat (limited to 'sys/geom/raid')
-rw-r--r--sys/geom/raid/md_intel.c4
-rw-r--r--sys/geom/raid/md_jmicron.c4
-rw-r--r--sys/geom/raid/md_nvidia.c4
-rw-r--r--sys/geom/raid/md_promise.c4
-rw-r--r--sys/geom/raid/md_sii.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/sys/geom/raid/md_intel.c b/sys/geom/raid/md_intel.c
index 3ec904c..9d6e444 100644
--- a/sys/geom/raid/md_intel.c
+++ b/sys/geom/raid/md_intel.c
@@ -1487,7 +1487,6 @@ g_raid_md_taste_intel(struct g_raid_md_object *md, struct g_class *mp,
/* Read metadata from device. */
meta = NULL;
- vendor = 0xffff;
disk_pos = 0;
g_topology_unlock();
error = g_raid_md_get_label(cp, serial, sizeof(serial));
@@ -1496,7 +1495,8 @@ g_raid_md_taste_intel(struct g_raid_md_object *md, struct g_class *mp,
pp->name, error);
goto fail2;
}
- len = 2;
+ vendor = 0xffff;
+ len = sizeof(vendor);
if (pp->geom->rank == 1)
g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor);
meta = intel_meta_read(cp);
diff --git a/sys/geom/raid/md_jmicron.c b/sys/geom/raid/md_jmicron.c
index d4748e0..9bd64d2 100644
--- a/sys/geom/raid/md_jmicron.c
+++ b/sys/geom/raid/md_jmicron.c
@@ -836,9 +836,9 @@ g_raid_md_taste_jmicron(struct g_raid_md_object *md, struct g_class *mp,
/* Read metadata from device. */
meta = NULL;
- vendor = 0xffff;
g_topology_unlock();
- len = 2;
+ vendor = 0xffff;
+ len = sizeof(vendor);
if (pp->geom->rank == 1)
g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor);
meta = jmicron_meta_read(cp);
diff --git a/sys/geom/raid/md_nvidia.c b/sys/geom/raid/md_nvidia.c
index 9a8397c..1c4fe5e 100644
--- a/sys/geom/raid/md_nvidia.c
+++ b/sys/geom/raid/md_nvidia.c
@@ -841,9 +841,9 @@ g_raid_md_taste_nvidia(struct g_raid_md_object *md, struct g_class *mp,
/* Read metadata from device. */
meta = NULL;
- vendor = 0xffff;
g_topology_unlock();
- len = 2;
+ vendor = 0xffff;
+ len = sizeof(vendor);
if (pp->geom->rank == 1)
g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor);
meta = nvidia_meta_read(cp);
diff --git a/sys/geom/raid/md_promise.c b/sys/geom/raid/md_promise.c
index 73a2520..2d161e7 100644
--- a/sys/geom/raid/md_promise.c
+++ b/sys/geom/raid/md_promise.c
@@ -1105,9 +1105,9 @@ g_raid_md_taste_promise(struct g_raid_md_object *md, struct g_class *mp,
/* Read metadata from device. */
meta = NULL;
- vendor = 0xffff;
g_topology_unlock();
- len = 2;
+ vendor = 0xffff;
+ len = sizeof(vendor);
if (pp->geom->rank == 1)
g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor);
subdisks = promise_meta_read(cp, metaarr);
diff --git a/sys/geom/raid/md_sii.c b/sys/geom/raid/md_sii.c
index 8a982a6..8370345 100644
--- a/sys/geom/raid/md_sii.c
+++ b/sys/geom/raid/md_sii.c
@@ -923,9 +923,9 @@ g_raid_md_taste_sii(struct g_raid_md_object *md, struct g_class *mp,
/* Read metadata from device. */
meta = NULL;
- vendor = 0xffff;
g_topology_unlock();
- len = 2;
+ vendor = 0xffff;
+ len = sizeof(vendor);
if (pp->geom->rank == 1)
g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor);
meta = sii_meta_read(cp);
OpenPOWER on IntegriCloud