@@ -65,17 +65,6 @@ static const char * const replace_cmd_group_usage[] = {
NULL
};
-static int is_numerical(const char *str)
-{
- if (!(*str >= '0' && *str <= '9'))
- return 0;
- while (*str >= '0' && *str <= '9')
- str++;
- if (*str != '\0')
- return 0;
- return 1;
-}
-
static int dev_replace_cancel_fd = -1;
static void dev_replace_sigint_handler(int signal)
{
@@ -38,3 +38,14 @@ u64 arg_strtou64(const char *str)
}
return value;
}
+
+int is_numerical(const char *str)
+{
+ if (!(*str >= '0' && *str <= '9'))
+ return 0;
+ while (*str >= '0' && *str <= '9')
+ str++;
+ if (*str != '\0')
+ return 0;
+ return 1;
+}
@@ -243,5 +243,6 @@ int btrfs_tree_search2_ioctl_supported(int fd);
int btrfs_check_nodesize(u32 nodesize, u32 sectorsize);
const char *get_argv0_buf(void);
+int is_numerical(const char *str);
#endif
Signed-off-by: Anand Jain <anand.jain@oracle.com> --- cmds-replace.c | 11 ----------- utils-lib.c | 11 +++++++++++ utils.h | 1 + 3 files changed, 12 insertions(+), 11 deletions(-)