aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-09-09 15:37:07 -0400
committerEric Sandeen <sandeen@redhat.com>2019-09-09 15:37:07 -0400
commit10cfd61e80f7d7d5d0b01d0f422db9e68330d5b4 (patch)
tree93b018c320b74bfedea27318e0aebac442ab99c8
parent660b5d9692691e384119dd11a8d60a900ef7b542 (diff)
downloadxfsprogs-dev-10cfd61e80f7d7d5d0b01d0f422db9e68330d5b4.tar.gz
xfs_spaceman: remove typedef usage
Kill off the struct typedefs inside spaceman. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--spaceman/file.c10
-rw-r--r--spaceman/freesp.c8
-rw-r--r--spaceman/space.h8
3 files changed, 13 insertions, 13 deletions
diff --git a/spaceman/file.c b/spaceman/file.c
index f96a29e53d..5647ca7df2 100644
--- a/spaceman/file.c
+++ b/spaceman/file.c
@@ -16,13 +16,13 @@
static cmdinfo_t print_cmd;
-fileio_t *filetable;
+struct fileio *filetable;
int filecount;
-fileio_t *file;
+struct fileio *file;
static void
print_fileio(
- fileio_t *file,
+ struct fileio *file,
int index,
int braces)
{
@@ -101,8 +101,8 @@ addfile(
}
/* Extend the table of currently open files */
- filetable = (fileio_t *)realloc(filetable, /* growing */
- ++filecount * sizeof(fileio_t));
+ filetable = (struct fileio *)realloc(filetable, /* growing */
+ ++filecount * sizeof(struct fileio));
if (!filetable) {
perror("realloc");
filecount = 0;
diff --git a/spaceman/freesp.c b/spaceman/freesp.c
index 034f234068..527ecb5209 100644
--- a/spaceman/freesp.c
+++ b/spaceman/freesp.c
@@ -14,17 +14,17 @@
#include "space.h"
#include "input.h"
-typedef struct histent
+struct histent
{
long long low;
long long high;
long long count;
long long blocks;
-} histent_t;
+};
static int agcount;
static xfs_agnumber_t *aglist;
-static histent_t *hist;
+static struct histent *hist;
static int dumpflag;
static long long equalsize;
static long long multsize;
@@ -82,7 +82,7 @@ hcmp(
const void *a,
const void *b)
{
- return ((histent_t *)a)->low - ((histent_t *)b)->low;
+ return ((struct histent *)a)->low - ((struct histent *)b)->low;
}
static void
diff --git a/spaceman/space.h b/spaceman/space.h
index b246f602cf..8b224acabf 100644
--- a/spaceman/space.h
+++ b/spaceman/space.h
@@ -6,16 +6,16 @@
#ifndef XFS_SPACEMAN_SPACE_H_
#define XFS_SPACEMAN_SPACE_H_
-typedef struct fileio {
+struct fileio {
struct xfs_fsop_geom geom; /* XFS filesystem geometry */
struct fs_path fs_path; /* XFS path information */
char *name; /* file name at time of open */
int fd; /* open file descriptor */
-} fileio_t;
+};
-extern fileio_t *filetable; /* open file table */
+extern struct fileio *filetable; /* open file table */
extern int filecount; /* number of open files */
-extern fileio_t *file; /* active file in file table */
+extern struct fileio *file; /* active file in file table */
extern int openfile(char *, struct xfs_fsop_geom *, struct fs_path *);
extern int addfile(char *, int , struct xfs_fsop_geom *, struct fs_path *);