All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: jaegeuk@kernel.org
Cc: Chenghao Fan <23b903068@stu.hit.edu.cn>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH 1/2] f2fs-tools: fix to use HDIO_GETGEO instead of HDIO_GETGIO
Date: Tue, 10 Mar 2026 20:06:55 +0800	[thread overview]
Message-ID: <20260310120656.604210-1-chao@kernel.org> (raw)

There is no definition of HDIO_GETGIO, it should be a typo, let's use
HDIO_GETGEO instead.

Reported-by: Chenghao Fan <23b903068@stu.hit.edu.cn>
Signed-off-by: Chao Yu <chao@kernel.org>
---
 lib/libf2fs.c  | 4 ++--
 tools/fibmap.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 13e4d0d..843494e 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -953,7 +953,7 @@ int get_device_info(int i)
 	uint32_t total_sectors;
 #endif
 	struct stat *stat_buf;
-#ifdef HDIO_GETGIO
+#ifdef HDIO_GETGEO
 	struct hd_geometry geom;
 #endif
 #if !defined(WITH_ANDROID) && defined(__linux__)
@@ -1062,7 +1062,7 @@ int get_device_info(int i)
 		dev->total_sectors /= dev->sector_size;
 
 		if (i == 0) {
-#ifdef HDIO_GETGIO
+#ifdef HDIO_GETGEO
 			if (ioctl(fd, HDIO_GETGEO, &geom) < 0)
 				c.start_sector = 0;
 			else
diff --git a/tools/fibmap.c b/tools/fibmap.c
index 3acc77b..0a92551 100644
--- a/tools/fibmap.c
+++ b/tools/fibmap.c
@@ -88,7 +88,7 @@ static void stat_bdev(struct stat *st, unsigned int *start_lba)
 #endif
 {
 	struct stat bdev_stat;
-#ifdef HDIO_GETGIO
+#ifdef HDIO_GETGEO
 	struct hd_geometry geom;
 #endif
 	char devname[32] = { 0, };
@@ -105,7 +105,7 @@ static void stat_bdev(struct stat *st, unsigned int *start_lba)
 		goto out;
 
 	if (S_ISBLK(bdev_stat.st_mode)) {
-#ifdef HDIO_GETGIO
+#ifdef HDIO_GETGEO
 		if (ioctl(fd, HDIO_GETGEO, &geom) < 0)
 			*start_lba = 0;
 		else
-- 
2.49.0



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

             reply	other threads:[~2026-03-10 12:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 12:06 Chao Yu via Linux-f2fs-devel [this message]
2026-03-10 12:06 ` [f2fs-dev] [PATCH 2/2] f2fs-tools: fix to avoid uninitialized variable access Chao Yu via Linux-f2fs-devel

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=20260310120656.604210-1-chao@kernel.org \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=23b903068@stu.hit.edu.cn \
    --cc=chao@kernel.org \
    --cc=jaegeuk@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.