diff options
author | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-10-07 14:20:17 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-11-05 13:36:43 +0100 |
commit | 119cdcad049e0464bfdd9ab19e2fd8cb4f9a82d6 (patch) | |
tree | 95dea358d25a8fdea7acabdfae6911eed7bb82f2 /util.c | |
parent | ReadMe: Fix stylistic issues (diff) | |
download | mdadm-119cdcad049e0464bfdd9ab19e2fd8cb4f9a82d6.tar.xz mdadm-119cdcad049e0464bfdd9ab19e2fd8cb4f9a82d6.zip |
mdadm: drop auto= support
According to author (and what was described in man):
"With mdadm 3.0, device creation is normally left up to udev so this is
option is unlikely to be needed"
This was a workaround for kernel 2.6 family issues (partitionable and
non-partitionable arrays hell) and I believe we are far away from it now.
I'm not aware of any usage of it, hence it is removed.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 36 |
1 files changed, 0 insertions, 36 deletions
@@ -760,42 +760,6 @@ bad_option: return 0; } -int is_standard(char *dev, int *nump) -{ - /* tests if dev is a "standard" md dev name. - * i.e if the last component is "/dNN" or "/mdNN", - * where NN is a string of digits - * Returns 1 if a partitionable standard, - * -1 if non-partitonable, - * 0 if not a standard name. - */ - char *d = strrchr(dev, '/'); - int type = 0; - int num; - if (!d) - return 0; - if (strncmp(d, "/d",2) == 0) - d += 2, type = 1; /* /dev/md/dN{pM} */ - else if (strncmp(d, "/md_d", 5) == 0) - d += 5, type = 1; /* /dev/md_dN{pM} */ - else if (strncmp(d, "/md", 3) == 0) - d += 3, type = -1; /* /dev/mdN */ - else if (d-dev > 3 && strncmp(d-2, "md/", 3) == 0) - d += 1, type = -1; /* /dev/md/N */ - else - return 0; - if (!*d) - return 0; - num = atoi(d); - while (isdigit(*d)) - d++; - if (*d) - return 0; - if (nump) *nump = num; - - return type; -} - unsigned long calc_csum(void *super, int bytes) { unsigned long long newcsum = 0; |