From patchwork Wed Aug 29 17:24:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Burri X-Patchwork-Id: 10580707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 065EA17DE for ; Wed, 29 Aug 2018 17:31:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D31352B891 for ; Wed, 29 Aug 2018 17:31:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D066F2B90A; Wed, 29 Aug 2018 17:31:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D4BD2B8F9 for ; Wed, 29 Aug 2018 17:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727818AbeH2V3k (ORCPT ); Wed, 29 Aug 2018 17:29:40 -0400 Received: from tty0.vserver.softronics.ch ([91.214.169.36]:53534 "EHLO fe1.digint.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727428AbeH2V3j (ORCPT ); Wed, 29 Aug 2018 17:29:39 -0400 Received: by fe1.digint.ch (Postfix, from userid 1000) id E8703307E6; Wed, 29 Aug 2018 19:23:11 +0200 (CEST) Received: from mail.tty0.ch (hermes.tty0.ch [172.21.1.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by fe1.digint.ch (Postfix) with ESMTPS id 38641307DF for ; Wed, 29 Aug 2018 19:23:11 +0200 (CEST) Received: from ares.tty0.ch (ares.tty0.ch [10.0.1.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.tty0.ch (Postfix) with ESMTPS id 22CC11DA0F0; Wed, 29 Aug 2018 19:22:40 +0200 (CEST) Received: by ares.tty0.ch (sSMTP sendmail emulation); Wed, 29 Aug 2018 19:24:45 +0200 From: Axel Burri To: linux-btrfs@vger.kernel.org Cc: Axel Burri Subject: [RFC PATCH 2/6] btrfs-progs: add btrfs- source files generated by splitcmd-gen.sh Date: Wed, 29 Aug 2018 19:24:05 +0200 Message-Id: <20180829172409.18064-3-axel@tty0.ch> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180829172409.18064-1-axel@tty0.ch> References: <20180829172409.18064-1-axel@tty0.ch> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Another approach would be to generate the splitted commands in the Makefile on-demand, which is probably not desired. Signed-off-by: Axel Burri --- btrfs-filesystem-usage.c | 23 +++++++++++++++++++++++ btrfs-qgroup-destroy.c | 23 +++++++++++++++++++++++ btrfs-receive.c | 23 +++++++++++++++++++++++ btrfs-send.c | 23 +++++++++++++++++++++++ btrfs-subvolume-delete.c | 23 +++++++++++++++++++++++ btrfs-subvolume-list.c | 23 +++++++++++++++++++++++ btrfs-subvolume-show.c | 23 +++++++++++++++++++++++ btrfs-subvolume-snapshot.c | 23 +++++++++++++++++++++++ 8 files changed, 184 insertions(+) create mode 100644 btrfs-filesystem-usage.c create mode 100644 btrfs-qgroup-destroy.c create mode 100644 btrfs-receive.c create mode 100644 btrfs-send.c create mode 100644 btrfs-subvolume-delete.c create mode 100644 btrfs-subvolume-list.c create mode 100644 btrfs-subvolume-show.c create mode 100644 btrfs-subvolume-snapshot.c diff --git a/btrfs-filesystem-usage.c b/btrfs-filesystem-usage.c new file mode 100644 index 00000000..e102ebc8 --- /dev/null +++ b/btrfs-filesystem-usage.c @@ -0,0 +1,23 @@ +/* + * btrfs-filesystem-usage + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-fi-usage.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_filesystem_usage(argc, argv); +} diff --git a/btrfs-qgroup-destroy.c b/btrfs-qgroup-destroy.c new file mode 100644 index 00000000..4fb32210 --- /dev/null +++ b/btrfs-qgroup-destroy.c @@ -0,0 +1,23 @@ +/* + * btrfs-qgroup-destroy + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-qgroup.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_qgroup_destroy(argc, argv); +} diff --git a/btrfs-receive.c b/btrfs-receive.c new file mode 100644 index 00000000..9fe94080 --- /dev/null +++ b/btrfs-receive.c @@ -0,0 +1,23 @@ +/* + * btrfs-receive + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-receive.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_receive(argc, argv); +} diff --git a/btrfs-send.c b/btrfs-send.c new file mode 100644 index 00000000..0eff2931 --- /dev/null +++ b/btrfs-send.c @@ -0,0 +1,23 @@ +/* + * btrfs-send + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-send.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_send(argc, argv); +} diff --git a/btrfs-subvolume-delete.c b/btrfs-subvolume-delete.c new file mode 100644 index 00000000..d6018d8b --- /dev/null +++ b/btrfs-subvolume-delete.c @@ -0,0 +1,23 @@ +/* + * btrfs-subvolume-delete + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-subvolume.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_subvol_delete(argc, argv); +} diff --git a/btrfs-subvolume-list.c b/btrfs-subvolume-list.c new file mode 100644 index 00000000..8529aef5 --- /dev/null +++ b/btrfs-subvolume-list.c @@ -0,0 +1,23 @@ +/* + * btrfs-subvolume-list + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-subvolume.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_subvol_list(argc, argv); +} diff --git a/btrfs-subvolume-show.c b/btrfs-subvolume-show.c new file mode 100644 index 00000000..856f97cf --- /dev/null +++ b/btrfs-subvolume-show.c @@ -0,0 +1,23 @@ +/* + * btrfs-subvolume-show + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-subvolume.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_subvol_show(argc, argv); +} diff --git a/btrfs-subvolume-snapshot.c b/btrfs-subvolume-snapshot.c new file mode 100644 index 00000000..efdc0142 --- /dev/null +++ b/btrfs-subvolume-snapshot.c @@ -0,0 +1,23 @@ +/* + * btrfs-subvolume-snapshot + * + * GENERATED BY splitcmd-gen.sh + */ + +#include "cmds-subvolume.c" + +/* + * Dummy object: used from second-level command groups (e.g. in + * "cmds-subvolume.c"), is never called in splitcmd executables. + */ +int handle_command_group(const struct cmd_group *grp, int argc, + char **argv) +{ + exit(1); +} + + +int main(int argc, char **argv) +{ + return cmd_subvol_snapshot(argc, argv); +}