From: Khem Raj <raj.khem@gmail.com>
To: drbd-dev@lists.linbit.com
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [Drbd-dev] [PATCH] replace off64_t with off_t
Date: Thu, 22 Dec 2022 03:20:25 -0000 [thread overview]
Message-ID: <20221222032018.1001700-1-raj.khem@gmail.com> (raw)
off_t is already 64-bits when _FILE_OFFSET_BITS=64
using off_t also makes it portable on musl systems
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
user/v9/drbdadm_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c
index 91e9507d..2030946c 100644
--- a/user/v9/drbdadm_main.c
+++ b/user/v9/drbdadm_main.c
@@ -1264,11 +1264,11 @@ static int adm_resource(const struct cfg_ctx *ctx)
return ex;
}
-static off64_t read_drbd_dev_size(int minor)
+static off_t read_drbd_dev_size(int minor)
{
char *path;
FILE *file;
- off64_t val;
+ off_t val;
int r;
m_asprintf(&path, "/sys/block/drbd%d/size", minor);
@@ -1289,9 +1289,9 @@ int adm_resize(const struct cfg_ctx *ctx)
char *argv[MAX_ARGS];
struct d_option *opt;
bool is_resize = !strcmp(ctx->cmd->name, "resize");
- off64_t old_size = -1;
- off64_t target_size = 0;
- off64_t new_size;
+ off_t old_size = -1;
+ off_t target_size = 0;
+ off_t new_size;
int argc = 0;
int silent;
int ex;
--
2.39.0
reply other threads:[~2022-12-22 3:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221222032018.1001700-1-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=drbd-dev@lists.linbit.com \
/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