diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-11 17:37:29 +0100 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2023-12-18 14:57:48 +0100 |
commit | 01dcfd9e47afaa1544d3ab5427717489af0f9075 (patch) | |
tree | f363f3bb60084297004fde8b156e80f74baa0203 | |
parent | cf9162582c9e1abacb1cc24a10a9b8bd166d0a0c (diff) | |
download | xfsprogs-dev-01dcfd9e47afaa1544d3ab5427717489af0f9075.tar.gz |
libxfs: rename struct libxfs_xinit to libxfs_init
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>
-rw-r--r-- | copy/xfs_copy.c | 2 | ||||
-rw-r--r-- | db/init.c | 2 | ||||
-rw-r--r-- | db/init.h | 2 | ||||
-rw-r--r-- | growfs/xfs_growfs.c | 2 | ||||
-rw-r--r-- | include/libxfs.h | 10 | ||||
-rw-r--r-- | libxfs/init.c | 6 | ||||
-rw-r--r-- | libxfs/topology.c | 5 | ||||
-rw-r--r-- | libxfs/topology.h | 4 | ||||
-rw-r--r-- | logprint/logprint.c | 2 | ||||
-rw-r--r-- | mkfs/xfs_mkfs.c | 18 | ||||
-rw-r--r-- | repair/globals.h | 2 | ||||
-rw-r--r-- | repair/init.c | 6 | ||||
-rw-r--r-- | repair/protos.h | 2 | ||||
-rw-r--r-- | repair/sb.c | 2 |
14 files changed, 34 insertions, 31 deletions
diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c index 86187086db..12ad81eb19 100644 --- a/copy/xfs_copy.c +++ b/copy/xfs_copy.c @@ -582,7 +582,7 @@ main(int argc, char **argv) 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; @@ -27,7 +27,7 @@ static struct xfs_mount xmount; 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) @@ -8,5 +8,5 @@ extern int blkbb; 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; diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c index 683961f6b9..802e011545 100644 --- a/growfs/xfs_growfs.c +++ b/growfs/xfs_growfs.c @@ -61,7 +61,7 @@ main(int argc, char **argv) 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; diff --git a/include/libxfs.h b/include/libxfs.h index 270efb2c18..6da8fd1c85 100644 --- a/include/libxfs.h +++ b/include/libxfs.h @@ -92,7 +92,7 @@ struct iomap; /* * 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" */ @@ -123,7 +123,7 @@ typedef struct libxfs_xinit { 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 */ @@ -133,8 +133,10 @@ typedef struct libxfs_xinit { 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); diff --git a/libxfs/init.c b/libxfs/init.c index 6482ba52b2..cafd40b112 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -273,7 +273,7 @@ destroy_caches(void) static void libxfs_close_devices( - struct libxfs_xinit *li) + struct libxfs_init *li) { if (li->ddev) libxfs_device_close(li->ddev); @@ -291,7 +291,7 @@ libxfs_close_devices( * 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; @@ -1034,7 +1034,7 @@ libxfs_umount( */ void libxfs_destroy( - struct libxfs_xinit *li) + struct libxfs_init *li) { int leaked; diff --git a/libxfs/topology.c b/libxfs/topology.c index 25f47bedaf..d6791c0f66 100644 --- a/libxfs/topology.c +++ b/libxfs/topology.c @@ -286,8 +286,9 @@ static void blkid_get_topology( #endif /* ENABLE_BLKID */ -void get_topology( - libxfs_init_t *xi, +void +get_topology( + struct libxfs_init *xi, struct fs_topology *ft, int force_overwrite) { diff --git a/libxfs/topology.h b/libxfs/topology.h index 1a0fe24c09..1af5b05494 100644 --- a/libxfs/topology.h +++ b/libxfs/topology.h @@ -18,9 +18,9 @@ typedef struct fs_topology { 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); diff --git a/logprint/logprint.c b/logprint/logprint.c index 1a096fa799..c6e5051e8f 100644 --- a/logprint/logprint.c +++ b/logprint/logprint.c @@ -25,7 +25,7 @@ int print_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) diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 19849ed21e..346516e13c 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -907,7 +907,7 @@ struct cli_params { struct fsxattr fsx; /* libxfs device setup */ - struct libxfs_xinit *xi; + struct libxfs_init *xi; }; /* @@ -1246,7 +1246,7 @@ validate_ag_geometry( static void zero_old_xfs_structures( - libxfs_init_t *xi, + struct libxfs_init *xi, xfs_sb_t *new_sb) { void *buf; @@ -2834,7 +2834,7 @@ _("log stripe unit (%d bytes) is too large (maximum is 256KiB)\n" static void open_devices( struct mkfs_params *cfg, - struct libxfs_xinit *xi) + struct libxfs_init *xi) { uint64_t sector_mask; @@ -2867,7 +2867,7 @@ open_devices( static void discard_devices( - struct libxfs_xinit *xi, + struct libxfs_init *xi, int quiet) { /* @@ -2887,7 +2887,7 @@ validate_datadev( struct mkfs_params *cfg, struct cli_params *cli) { - struct libxfs_xinit *xi = cli->xi; + struct libxfs_init *xi = cli->xi; if (!xi->dsize) { /* @@ -2934,7 +2934,7 @@ validate_logdev( struct mkfs_params *cfg, struct cli_params *cli) { - struct libxfs_xinit *xi = cli->xi; + struct libxfs_init *xi = cli->xi; cfg->loginternal = cli->loginternal; @@ -2998,7 +2998,7 @@ validate_rtdev( 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) { @@ -3750,7 +3750,7 @@ alloc_write_buf( 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) @@ -4055,7 +4055,7 @@ main( char *protostring = NULL; int worst_freelist = 0; - struct libxfs_xinit xi = { + struct libxfs_init xi = { .isdirect = LIBXFS_DIRECT, .isreadonly = LIBXFS_EXCLUSIVELY, }; diff --git a/repair/globals.h b/repair/globals.h index f2952d8b47..89f1b0e078 100644 --- a/repair/globals.h +++ b/repair/globals.h @@ -169,6 +169,6 @@ extern int thread_count; /* 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 */ diff --git a/repair/init.c b/repair/init.c index 6e3548b32e..1c562fb343 100644 --- a/repair/init.c +++ b/repair/init.c @@ -18,7 +18,7 @@ #include "libfrog/dahashselftest.h" #include <sys/resource.h> -struct libxfs_xinit x; +struct libxfs_init x; static void ts_create(void) @@ -52,9 +52,9 @@ increase_rlimit(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; diff --git a/repair/protos.h b/repair/protos.h index 83e471ff2a..e2f39f1d6e 100644 --- a/repair/protos.h +++ b/repair/protos.h @@ -4,7 +4,7 @@ * 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, diff --git a/repair/sb.c b/repair/sb.c index 7391cf043f..b823ba3a9a 100644 --- a/repair/sb.c +++ b/repair/sb.c @@ -176,7 +176,7 @@ static int guess_default_geometry( uint64_t *agsize, uint64_t *agcount, - libxfs_init_t *x) + struct libxfs_init *x) { struct fs_topology ft; int blocklog; |