diff options
author | Neil Brown <neilb@suse.de> | 2005-08-09 04:25:27 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-08-09 04:25:27 +0000 |
commit | 586ed40547a380b9f8bd58aa87c12fbaf6eabf65 (patch) | |
tree | e075277fb987eeba9e18ca0ed1e21aee4cd61a46 /mdadm.c | |
parent | 8068890f1116c6fc5ae87596bb6b8272f79d2d1c (diff) | |
download | mdadm-586ed40547a380b9f8bd58aa87c12fbaf6eabf65.tar.gz mdadm-586ed40547a380b9f8bd58aa87c12fbaf6eabf65.tar.xz mdadm-586ed40547a380b9f8bd58aa87c12fbaf6eabf65.zip |
Support fixing of byte-swapped superblocks.
Good for moving between little-endian and big-endian.
Still needs documentation.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -547,6 +547,20 @@ int main(int argc, char *argv[]) continue; if (strcmp(update, "resync")==0) continue; + if (strcmp(update, "byteorder")==0) { + if (ss) { + fprintf(stderr, Name ": must not set metadata type with --update=byteorder.\n"); + exit(2); + } + for(i=0; !ss && superlist[i]; i++) + ss = superlist[i]->match_metadata_desc("0.swap"); + if (!ss) { + fprintf(stderr, Name ": INTERNAL ERROR cannot find 0.swap\n"); + exit(2); + } + + continue; + } fprintf(stderr, Name ": '--update %s' invalid. Only 'sparc2.2', 'super-minor', 'resync' or 'summaries' supported\n",update); exit(2); |