linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: clm@fb.com, dsterba@suse.cz
Subject: [PATCH 1/2] btrfs-progs: move is_numerical to utils-lib.h and make it non static
Date: Fri, 14 Aug 2015 18:36:50 +0800	[thread overview]
Message-ID: <1439548611-29730-2-git-send-email-anand.jain@oracle.com> (raw)
In-Reply-To: <1439548611-29730-1-git-send-email-anand.jain@oracle.com>

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(-)

diff --git a/cmds-replace.c b/cmds-replace.c
index 85365e3..e6a27e3 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -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)
 {
diff --git a/utils-lib.c b/utils-lib.c
index 79ef35e..9ac0b7b 100644
--- a/utils-lib.c
+++ b/utils-lib.c
@@ -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;
+}
diff --git a/utils.h b/utils.h
index 94606ed..0975301 100644
--- a/utils.h
+++ b/utils.h
@@ -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
-- 
2.4.1


  reply	other threads:[~2015-08-14 10:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14 10:36 [PATCH 0/2] Btrfs-progs: device delete to accept devid Anand Jain
2015-08-14 10:36 ` Anand Jain [this message]
2015-08-14 10:36 ` [PATCH 2/2] btrfs-progs: " Anand Jain
2015-08-17  7:00   ` Goffredo Baroncelli
2015-08-17 11:17     ` Anand Jain
2015-08-20 11:29   ` Goffredo Baroncelli
2015-08-28 14:17     ` Anand Jain
2015-08-28 16:56       ` Goffredo Baroncelli
2015-08-28 16:57       ` Goffredo Baroncelli
  -- strict thread matches above, loose matches on Subject: below --
2015-04-20 10:29 [PATCH] device delete by devid Anand Jain
2015-04-20 10:29 ` [PATCH 1/2] btrfs-progs: move is_numerical to utils-lib.h and make it non static Anand Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439548611-29730-2-git-send-email-anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).