diff options
author | Maciej Naruszewicz <maciej.naruszewicz@intel.com> | 2012-10-02 08:28:30 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-02 08:28:30 +0200 |
commit | e50cf22073d583984d7592efb3a97047be0abfd4 (patch) | |
tree | 3d5beaf5e1aeecd692b69d5266ae7b1e17354259 /Detail.c | |
parent | Manage: fix checks for removal from a container. (diff) | |
download | mdadm-e50cf22073d583984d7592efb3a97047be0abfd4.tar.xz mdadm-e50cf22073d583984d7592efb3a97047be0abfd4.zip |
imsm: Add --export option for --detail-platform
This option will provide most of information we can get via
mdadm --detail-platform [-e format] in the key=value format.
Example output:
$ mdadm --detail-platform
Platform : Intel(R) Matrix Storage Manager
Version : 9.5.0.1037
RAID Levels : raid0 raid1 raid10 raid5
Chunk Sizes : 4k 8k 16k 32k 64k 128k
2TB volumes : supported
2TB disks : not supported
Max Disks : 7
Max Volumes : 2 per array, 4 per controller
I/O Controller : /sys/devices/pci0000:00/0000:00:1f.2 (SATA)
$ mdadm --detail-platform --export
MD_FIRMWARE_TYPE=imsm
IMSM_VERSION=9.5.0.1037
IMSM_SUPPORTED_RAID_LEVELS=raid0 raid1 raid10 raid5
IMSM_SUPPORTED_CHUNK_SIZES=4k 8k 16k 32k 64k 128k
IMSM_2TB_VOLUMES=yes
IMSM_2TB_DISKS=no
IMSM_MAX_DISKS=7
IMSM_MAX_VOLUMES_PER_ARRAY=2
IMSM_MAX_VOLUMES_PER_CONTROLLER=4
Signed-off-by: Maciej Naruszewicz <maciej.naruszewicz@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -616,7 +616,7 @@ out: return rv; } -int Detail_Platform(struct superswitch *ss, int scan, int verbose) +int Detail_Platform(struct superswitch *ss, int scan, int verbose, int export) { /* display platform capabilities for the given metadata format * 'scan' in this context means iterate over all metadata types @@ -624,7 +624,9 @@ int Detail_Platform(struct superswitch *ss, int scan, int verbose) int i; int err = 1; - if (ss && ss->detail_platform) + if (ss && export && ss->export_detail_platform) + err = ss->export_detail_platform(verbose); + else if (ss && ss->detail_platform) err = ss->detail_platform(verbose, 0); else if (ss) { if (verbose > 0) @@ -650,6 +652,8 @@ int Detail_Platform(struct superswitch *ss, int scan, int verbose) if (verbose > 0) pr_err("%s metadata is platform independent\n", meta->name ? : "[no name]"); + } else if (export && meta->export_detail_platform) { + err |= meta->export_detail_platform(verbose); } else err |= meta->detail_platform(verbose, 0); } |