X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=util.c;h=2d51de02ba4386ea3fae93a4cd41d7b7e998773b;hp=75f370644124351c6279d3a0b194d7416745604f;hb=e4965ef8461b3d0db6e94939f07d814d819f86c2;hpb=2a528478c75b6659188fc2ce0d9543124992fe6c diff --git a/util.c b/util.c index 75f37064..2d51de02 100644 --- a/util.c +++ b/util.c @@ -606,6 +606,23 @@ char *human_size_brief(long long bytes) ); return buf; } + +void print_r10_layout(int layout) +{ + int near = layout & 255; + int far = (layout >> 8) & 255; + int offset = (layout&0x10000); + char *sep = ""; + + if (near != 1) { + printf("%s near=%d", sep, near); + sep = ","; + } + if (far != 1) + printf("%s %s=%d", sep, offset?"offset":"far", far); + if (near*far == 1) + printf("NO REDUNDANCY"); +} #endif #if !defined(MDASSEMBLE) || defined(MDASSEMBLE) && defined(MDASSEMBLE_AUTO)