]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Hide subordinate superswitch structures.
authorNeil Brown <neilb@suse.de>
Sat, 12 Jul 2008 10:27:38 +0000 (20:27 +1000)
committerNeil Brown <neilb@suse.de>
Sat, 12 Jul 2008 10:27:38 +0000 (20:27 +1000)
Only one superswitch should be externally visible for each
general type.  Others which handle different flavours
(e.g. container/data-array) should be internal only.

mdadm.h
mdmon.h
super-ddf.c
super-intel.c

diff --git a/mdadm.h b/mdadm.h
index c0e3691f1047bf6145352c2ed0a8865acd8809f4..9d4f6b78b225251f6f6c936fd52f67c2573a0f34 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -450,9 +450,9 @@ extern struct superswitch {
 
        int swapuuid; /* true if uuid is bigending rather than hostendian */
        int external;
-} super0, super1, super_ddf, super_ddf_bvd, super_ddf_svd, *superlist[];
+} super0, super1, super_ddf, *superlist[];
 
-extern struct superswitch super_imsm, super_imsm_volume;
+extern struct superswitch super_imsm;
 
 struct supertype {
        struct superswitch *ss;
diff --git a/mdmon.h b/mdmon.h
index f1b6d76ea367a2ec55cb06df41bb173e4f0c0930..a679ec367d04f3aea8d01dcb1f185a76878ffaa0 100644 (file)
--- a/mdmon.h
+++ b/mdmon.h
@@ -65,6 +65,4 @@ int read_dev_state(int fd);
 
 struct mdstat_ent *mdstat_read(int hold, int start);
 
-extern struct superswitch super_ddf, super_ddf_bvd, super_ddf_svd;
-
 extern int exit_now, manager_ready;
index 8f7cec4e3318752cea03fbb2dc7ce5356b7c1fbe..5644aeab9e32a490106c9e8a92db0b846f963d54 100644 (file)
@@ -425,7 +425,7 @@ struct ddf_super {
 #define offsetof(t,f) ((size_t)&(((t*)0)->f))
 #endif
 
-extern struct superswitch super_ddf_container, super_ddf_bvd, super_ddf;
+static struct superswitch super_ddf_container, super_ddf_bvd, super_ddf_svd;
 
 static int calc_crc(void *buf, int len)
 {
@@ -3135,7 +3135,7 @@ struct superswitch super_ddf = {
 /* Super_ddf_container is set by validate_geometry_ddf when given a
  * device that is not part of any array
  */
-struct superswitch super_ddf_container = {
+static struct superswitch super_ddf_container = {
 #ifndef MDASSEMBLE
        .validate_geometry = validate_geometry_ddf_container,
        .write_init_super = write_init_super_ddf,
@@ -3155,7 +3155,7 @@ struct superswitch super_ddf_container = {
        .external       = 1,
 };
 
-struct superswitch super_ddf_bvd = {
+static struct superswitch super_ddf_bvd = {
 #ifndef        MDASSEMBLE
 //     .detail_super   = detail_super_ddf_bvd,
 //     .brief_detail_super = brief_detail_super_ddf_bvd,
@@ -3176,7 +3176,7 @@ struct superswitch super_ddf_bvd = {
        .external       = 2,
 };
 
-struct superswitch super_ddf_svd = {
+static struct superswitch super_ddf_svd = {
 #ifndef        MDASSEMBLE
 //     .detail_super   = detail_super_ddf_svd,
 //     .brief_detail_super = brief_detail_super_ddf_svd,
index 68674e5c0c6b82a79fae944625d99425a609b8c4..33245299ae3d39ba862635f3b912e9d76cf65a38 100644 (file)
@@ -124,6 +124,8 @@ static unsigned int mpb_sectors(struct imsm_super *mpb)
        return sector_count(__le32_to_cpu(mpb->mpb_size));
 }
 
+static struct superswitch super_imsm_volume;
+
 /* internal representation of IMSM metadata */
 struct intel_super {
        union {
@@ -1912,7 +1914,7 @@ struct superswitch super_imsm_container = {
        .external       = 1,
 };
 
-struct superswitch super_imsm_volume = {
+static struct superswitch super_imsm_volume = {
        .update_super   = update_super_imsm,
        .init_super     = init_super_imsm_volume,
        .add_to_super   = add_to_super_imsm_volume,