From 25aa7329141c0b28d8811671627f0f5c5dc22273 Mon Sep 17 00:00:00 2001 From: Mariusz Tkaczyk Date: Thu, 23 Mar 2023 17:50:17 +0100 Subject: mdadm: numbered names verification New functions added to remove literals and make the code reusable. Use parse_num() instead of is_numer(). Signed-off-by: Mariusz Tkaczyk Signed-off-by: Jes Sorensen --- mdadm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mdadm.h') diff --git a/mdadm.h b/mdadm.h index 0932c2d3..83f2cf7f 100644 --- a/mdadm.h +++ b/mdadm.h @@ -1601,7 +1601,7 @@ int default_layout(struct supertype *st, int level, int verbose); extern int is_near_layout_10(int layout); extern int parse_layout_10(char *layout); extern int parse_layout_faulty(char *layout); -extern int parse_num(int *dest, char *num); +extern int parse_num(int *dest, const char *num); extern int parse_cluster_confirm_arg(char *inp, char **devname, int *slot); extern int check_ext2(int fd, char *name); extern int check_reiser(int fd, char *name); @@ -1651,6 +1651,8 @@ extern int use_udev(void); extern unsigned long GCD(unsigned long a, unsigned long b); extern int conf_name_is_free(char *name); extern bool is_devname_ignore(char *devname); +extern bool is_devname_md_numbered(const char *devname); +extern bool is_devname_md_d_numbered(const char *devname); extern int conf_verify_devnames(struct mddev_ident *array_list); extern int devname_matches(char *name, char *match); extern struct mddev_ident *conf_match(struct supertype *st, -- cgit v1.2.3