From patchwork Tue Sep 18 10:50:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 1471831 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EFED2DF24C for ; Tue, 18 Sep 2012 10:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757887Ab2IRKuP (ORCPT ); Tue, 18 Sep 2012 06:50:15 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:47139 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756633Ab2IRKuO (ORCPT ); Tue, 18 Sep 2012 06:50:14 -0400 X-IronPort-AV: E=Sophos;i="4.80,443,1344182400"; d="scan'208";a="5864902" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 18 Sep 2012 18:48:55 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id q8IAoBmr016286 for ; Tue, 18 Sep 2012 18:50:11 +0800 Received: from [10.167.225.199] ([10.167.225.199]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2012091818502894-907533 ; Tue, 18 Sep 2012 18:50:28 +0800 Message-ID: <505851E3.8030709@cn.fujitsu.com> Date: Tue, 18 Sep 2012 18:50:11 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Linux Btrfs Subject: [PATCH V4 1/7] Btrfs-progs: move the function declarations to a new head file References: <50584E6D.8000602@cn.fujitsu.com> In-Reply-To: <50584E6D.8000602@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/09/18 18:50:28, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/09/18 18:50:29, Serialize complete at 2012/09/18 18:50:29 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Zhou Bo Move the function declarations to a new head file. Signed-off-by: Zhou Bo Signed-off-by: Miao Xie --- Changelog v3 -> v4: - no change. Changelog v2 -> v3: - remove path_for_root() in send-utils.c Changelog v1 -> v2: - new patch. --- btrfs-list.c | 1 + btrfs-list.h | 21 +++++++++++++++++++++ cmds-inspect.c | 4 +--- cmds-subvolume.c | 5 +---- send-utils.c | 4 +--- 5 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 btrfs-list.h diff --git a/btrfs-list.c b/btrfs-list.c index 514cac7..ef621f0 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -35,6 +35,7 @@ #include "transaction.h" #include "utils.h" #include +#include "btrfs-list.h" /* we store all the roots we find in an rbtree so that we can * search for them later. diff --git a/btrfs-list.h b/btrfs-list.h new file mode 100644 index 0000000..96f3641 --- /dev/null +++ b/btrfs-list.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2012 Fujitsu. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License v2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 021110-1307, USA. + */ + +int list_subvols(int fd, int print_parent, int get_default, int print_uuid); +int find_updated_files(int fd, u64 root_id, u64 oldest_gen); +char *path_for_root(int fd, u64 root); diff --git a/cmds-inspect.c b/cmds-inspect.c index 2f0228f..f943ed9 100644 --- a/cmds-inspect.c +++ b/cmds-inspect.c @@ -24,9 +24,7 @@ #include "ioctl.h" #include "commands.h" - -/* btrfs-list.c */ -char *path_for_root(int fd, u64 root); +#include "btrfs-list.h" static const char * const inspect_cmd_group_usage[] = { "btrfs inspect-internal ", diff --git a/cmds-subvolume.c b/cmds-subvolume.c index aaf5dde..ffc5d95 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -29,10 +29,7 @@ #include "qgroup.h" #include "commands.h" - -/* btrfs-list.c */ -int list_subvols(int fd, int print_parent, int print_uuid, int get_default); -int find_updated_files(int fd, u64 root_id, u64 oldest_gen); +#include "btrfs-list.h" static const char * const subvolume_cmd_group_usage[] = { "btrfs subvolume ", diff --git a/send-utils.c b/send-utils.c index af495a0..096fa02 100644 --- a/send-utils.c +++ b/send-utils.c @@ -21,9 +21,7 @@ #include "ctree.h" #include "send-utils.h" #include "ioctl.h" - -/* btrfs-list.c */ -char *path_for_root(int fd, u64 root); +#include "btrfs-list.h" static struct rb_node *tree_insert(struct rb_root *root, struct subvol_info *si,