linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-ext4@vger.kernel.org
Subject: [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms
Date: Tue, 15 Jun 2021 21:53:31 -0700	[thread overview]
Message-ID: <20210616045334.1655288-4-ebiggers@kernel.org> (raw)
In-Reply-To: <20210616045334.1655288-1-ebiggers@kernel.org>

From: Eric Biggers <ebiggers@google.com>

Since commit e8c858047be6 ("libext2fs: fix build issue for on
Windows/Cygwin systems"), ext2fs_get_device_size2() is available in
Windows builds of libext2fs.  So there is no need for mke2fs to call
ext2fs_get_device_size() instead.

This fixes a -Wincompatible-pointer-types warning because
ext2fs_get_device_size() was being passed a 'blk64_t *', but it expected
a 'blk_t *'.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 misc/mke2fs.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index afbcf486..d5ab334e 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1989,15 +1989,9 @@ profile_error:
 		dev_size = fs_blocks_count;
 		retval = 0;
 	} else
-#ifndef _WIN32
 		retval = ext2fs_get_device_size2(device_name,
 						 EXT2_BLOCK_SIZE(&fs_param),
 						 &dev_size);
-#else
-		retval = ext2fs_get_device_size(device_name,
-						EXT2_BLOCK_SIZE(&fs_param),
-						&dev_size);
-#endif
 	if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
 		com_err(program_name, retval, "%s",
 			_("while trying to determine filesystem size"));
-- 
2.32.0.272.g935e593368-goog


  parent reply	other threads:[~2021-06-16  4:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
2021-06-16  4:53 ` [PATCH 1/6] libext2fs: improve jbd_debug() implementation Eric Biggers
2021-07-07  2:38   ` Theodore Ts'o
2021-06-16  4:53 ` [PATCH 2/6] e2fsck: sync fc_do_one_pass() changes from kernel Eric Biggers
2021-07-07  2:42   ` Theodore Ts'o
2021-06-16  4:53 ` Eric Biggers [this message]
2021-07-07  2:43   ` [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms Theodore Ts'o
2021-06-16  4:53 ` [PATCH 4/6] Fix -Wunused-parameter warnings Eric Biggers
2021-07-07  2:44   ` Theodore Ts'o
2021-06-16  4:53 ` [PATCH 5/6] Fix -Wunused-variable warnings Eric Biggers
2021-07-07  3:13   ` Theodore Ts'o
2021-06-16  4:53 ` [PATCH 6/6] libext2fs: fix a -Wunused-label warning Eric Biggers
2021-07-07  3:14   ` Theodore Ts'o

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=20210616045334.1655288-4-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /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).