From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@sandeen.net, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org, Dave Chinner <dchinner@redhat.com>
Subject: [PATCH 1/4] xfs_spaceman: remove typedef usage
Date: Tue, 03 Sep 2019 21:38:22 -0700 [thread overview]
Message-ID: <156757190251.1838733.11346599101227268283.stgit@magnolia> (raw)
In-Reply-To: <156757189636.1838733.8025635445292375382.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
Kill off the struct typedefs inside spaceman.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
---
spaceman/file.c | 10 +++++-----
spaceman/freesp.c | 8 ++++----
spaceman/space.h | 8 ++++----
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/spaceman/file.c b/spaceman/file.c
index f96a29e5..5647ca7d 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 034f2340..527ecb52 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 b246f602..8b224aca 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 *);
next prev parent reply other threads:[~2019-09-04 4:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 4:38 [PATCH v2 0/4] xfs_spaceman: use runtime support library Darrick J. Wong
2019-09-04 4:38 ` Darrick J. Wong [this message]
2019-09-04 4:38 ` [PATCH 2/4] xfs_spaceman: remove unnecessary test in openfile() Darrick J. Wong
2019-09-04 4:38 ` [PATCH 3/4] xfs_spaceman: embed struct xfs_fd in struct fileio Darrick J. Wong
2019-09-04 23:59 ` Dave Chinner
2019-09-04 4:38 ` [PATCH 4/4] xfs_spaceman: convert open-coded unit conversions to helpers Darrick J. Wong
2019-09-05 0:01 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2019-08-26 21:20 [PATCH 0/4] xfs_spaceman: use runtime support library Darrick J. Wong
2019-08-26 21:20 ` [PATCH 1/4] xfs_spaceman: remove typedef usage Darrick J. Wong
2019-08-27 5:01 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=156757190251.1838733.11346599101227268283.stgit@magnolia \
--to=darrick.wong@oracle.com \
--cc=dchinner@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).