btrfs-progs: Introduce rescue.h to resolve missing-prototypes for chunk and super rescue
We don't have any header declaring btrfs_recover_chunk_tree() nor btrfs_recover_superblocks(), thus W=1 gives missing-prototypes warning on them. Fix it by introducing a new header, rescue.h for these two functions, so make W=1 could be much happier. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
dd34df5024
commit
36efd62136
|
@ -40,6 +40,7 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "btrfsck.h"
|
#include "btrfsck.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
#include "rescue.h"
|
||||||
|
|
||||||
struct recover_control {
|
struct recover_control {
|
||||||
int verbose;
|
int verbose;
|
||||||
|
|
|
@ -26,15 +26,13 @@
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "help.h"
|
#include "help.h"
|
||||||
|
#include "rescue.h"
|
||||||
|
|
||||||
static const char * const rescue_cmd_group_usage[] = {
|
static const char * const rescue_cmd_group_usage[] = {
|
||||||
"btrfs rescue <command> [options] <path>",
|
"btrfs rescue <command> [options] <path>",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int btrfs_recover_chunk_tree(const char *path, int verbose, int yes);
|
|
||||||
int btrfs_recover_superblocks(const char *path, int verbose, int yes);
|
|
||||||
|
|
||||||
static const char * const cmd_rescue_chunk_recover_usage[] = {
|
static const char * const cmd_rescue_chunk_recover_usage[] = {
|
||||||
"btrfs rescue chunk-recover [options] <device>",
|
"btrfs rescue chunk-recover [options] <device>",
|
||||||
"Recover the chunk tree by scanning the devices one by one.",
|
"Recover the chunk tree by scanning the devices one by one.",
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 SUSE. 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __BTRFS_RESCUE_H__
|
||||||
|
#define __BTRFS_RESCUE_H__
|
||||||
|
|
||||||
|
int btrfs_recover_superblocks(const char *path, int verbose, int yes);
|
||||||
|
int btrfs_recover_chunk_tree(const char *path, int verbose, int yes);
|
||||||
|
|
||||||
|
#endif
|
|
@ -34,6 +34,7 @@
|
||||||
#include "crc32c.h"
|
#include "crc32c.h"
|
||||||
#include "volumes.h"
|
#include "volumes.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
#include "rescue.h"
|
||||||
|
|
||||||
struct btrfs_recover_superblock {
|
struct btrfs_recover_superblock {
|
||||||
struct btrfs_fs_devices *fs_devices;
|
struct btrfs_fs_devices *fs_devices;
|
||||||
|
|
Loading…
Reference in New Issue