blob: 2841d0feaf7d0b7218bb918c006d6c844f35df91 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From 5adae6737e919d957a08df437951ccb6996f9882 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 21 Dec 2022 19:16:03 -0800
4Subject: [PATCH 1/2] replace off64_t with off_t
5
6off_t is already 64-bits when _FILE_OFFSET_BITS=64
7using off_t also makes it portable on musl systems
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 user/v9/drbdadm_main.c | 10 +++++-----
13 1 file changed, 5 insertions(+), 5 deletions(-)
14
15diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c
16index 91e9507d..2030946c 100644
17--- a/user/v9/drbdadm_main.c
18+++ b/user/v9/drbdadm_main.c
19@@ -1264,11 +1264,11 @@ static int adm_resource(const struct cfg_ctx *ctx)
20 return ex;
21 }
22
23-static off64_t read_drbd_dev_size(int minor)
24+static off_t read_drbd_dev_size(int minor)
25 {
26 char *path;
27 FILE *file;
28- off64_t val;
29+ off_t val;
30 int r;
31
32 m_asprintf(&path, "/sys/block/drbd%d/size", minor);
33@@ -1289,9 +1289,9 @@ int adm_resize(const struct cfg_ctx *ctx)
34 char *argv[MAX_ARGS];
35 struct d_option *opt;
36 bool is_resize = !strcmp(ctx->cmd->name, "resize");
37- off64_t old_size = -1;
38- off64_t target_size = 0;
39- off64_t new_size;
40+ off_t old_size = -1;
41+ off_t target_size = 0;
42+ off_t new_size;
43 int argc = 0;
44 int silent;
45 int ex;
46--
472.39.0
48