Make the struct name more usual, and remove the libxfs_init_t typedef.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
xfs_alloc_rec_t *rec_ptr;
extern char *optarg;
extern int optind;
- libxfs_init_t xargs;
+ struct libxfs_init xargs;
thread_args *tcarg;
struct stat statbuf;
int error;
struct xfs_mount *mp;
static struct xlog xlog;
xfs_agnumber_t cur_agno = NULLAGNUMBER;
-libxfs_init_t x;
+struct libxfs_init x;
static void
usage(void)
extern int exitcode;
extern int expert_mode;
extern xfs_mount_t *mp;
-extern libxfs_init_t x;
+extern struct libxfs_init x;
extern xfs_agnumber_t cur_agno;
char *logdev; /* log device name */
char *rtdev; /* RT device name */
fs_path_t *fs; /* mount point information */
- libxfs_init_t xi; /* libxfs structure */
+ struct libxfs_init xi; /* libxfs structure */
char rpath[PATH_MAX];
int ret;
/*
* Argument structure for libxfs_init().
*/
-typedef struct libxfs_xinit {
+struct libxfs_init {
/* input parameters */
char *dname; /* pathname of data "subvolume" */
char *logname; /* pathname of log "subvolume" */
int logfd; /* log subvolume file descriptor */
int rtfd; /* realtime subvolume file descriptor */
int bcache_flags; /* cache init flags */
-} libxfs_init_t;
+};
#define LIBXFS_ISREADONLY 0x0002 /* disallow all mounted filesystems */
#define LIBXFS_ISINACTIVE 0x0004 /* allow mounted only if mounted ro */
extern char *progname;
extern xfs_lsn_t libxfs_max_lsn;
-extern int libxfs_init (libxfs_init_t *);
-void libxfs_destroy(struct libxfs_xinit *li);
+
+int libxfs_init(struct libxfs_init *);
+void libxfs_destroy(struct libxfs_init *li);
+
extern int libxfs_device_to_fd (dev_t);
extern dev_t libxfs_device_open (char *, int, int, int);
extern void libxfs_device_close (dev_t);
static void
libxfs_close_devices(
- struct libxfs_xinit *li)
+ struct libxfs_init *li)
{
if (li->ddev)
libxfs_device_close(li->ddev);
* Caller gets a 0 on failure (and we print a message), 1 on success.
*/
int
-libxfs_init(libxfs_init_t *a)
+libxfs_init(struct libxfs_init *a)
{
char *dname;
char *logname;
*/
void
libxfs_destroy(
- struct libxfs_xinit *li)
+ struct libxfs_init *li)
{
int leaked;
#endif /* ENABLE_BLKID */
-void get_topology(
- libxfs_init_t *xi,
+void
+get_topology(
+ struct libxfs_init *xi,
struct fs_topology *ft,
int force_overwrite)
{
int psectorsize; /* physical sector size */
} fs_topology_t;
-extern void
+void
get_topology(
- libxfs_init_t *xi,
+ struct libxfs_init *xi,
struct fs_topology *ft,
int force_overwrite);
int print_no_data;
int print_no_print;
static int print_operation = OP_PRINT;
-static struct libxfs_xinit x;
+static struct libxfs_init x;
static void
usage(void)
struct fsxattr fsx;
/* libxfs device setup */
- struct libxfs_xinit *xi;
+ struct libxfs_init *xi;
};
/*
static void
zero_old_xfs_structures(
- libxfs_init_t *xi,
+ struct libxfs_init *xi,
xfs_sb_t *new_sb)
{
void *buf;
static void
open_devices(
struct mkfs_params *cfg,
- struct libxfs_xinit *xi)
+ struct libxfs_init *xi)
{
uint64_t sector_mask;
static void
discard_devices(
- struct libxfs_xinit *xi,
+ struct libxfs_init *xi,
int quiet)
{
/*
struct mkfs_params *cfg,
struct cli_params *cli)
{
- struct libxfs_xinit *xi = cli->xi;
+ struct libxfs_init *xi = cli->xi;
if (!xi->dsize) {
/*
struct mkfs_params *cfg,
struct cli_params *cli)
{
- struct libxfs_xinit *xi = cli->xi;
+ struct libxfs_init *xi = cli->xi;
cfg->loginternal = cli->loginternal;
struct mkfs_params *cfg,
struct cli_params *cli)
{
- struct libxfs_xinit *xi = cli->xi;
+ struct libxfs_init *xi = cli->xi;
if (!xi->rtdev) {
if (cli->rtsize) {
static void
prepare_devices(
struct mkfs_params *cfg,
- struct libxfs_xinit *xi,
+ struct libxfs_init *xi,
struct xfs_mount *mp,
struct xfs_sb *sbp,
bool clear_stale)
char *protostring = NULL;
int worst_freelist = 0;
- struct libxfs_xinit xi = {
+ struct libxfs_init xi = {
.isdirect = LIBXFS_DIRECT,
.isreadonly = LIBXFS_EXCLUSIVELY,
};
/* If nonzero, simulate failure after this phase. */
extern int fail_after_phase;
-extern libxfs_init_t x;
+extern struct libxfs_init x;
#endif /* _XFS_REPAIR_GLOBAL_H */
#include "libfrog/dahashselftest.h"
#include <sys/resource.h>
-struct libxfs_xinit x;
+struct libxfs_init x;
static void
ts_create(void)
}
void
-xfs_init(libxfs_init_t *args)
+xfs_init(struct libxfs_init *args)
{
- memset(args, 0, sizeof(libxfs_init_t));
+ memset(args, 0, sizeof(*args));
args->dname = fs_name;
args->disfile = isa_file;
* All Rights Reserved.
*/
-void xfs_init(libxfs_init_t *args);
+void xfs_init(struct libxfs_init *args);
int verify_sb(char *sb_buf,
xfs_sb_t *sb,
guess_default_geometry(
uint64_t *agsize,
uint64_t *agcount,
- libxfs_init_t *x)
+ struct libxfs_init *x)
{
struct fs_topology ft;
int blocklog;