Skip to content

Commit d773784

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs-tools: fix to use HDIO_GETGEO instead of HDIO_GETGIO
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> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent bce70c0 commit d773784

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/libf2fs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ int get_device_info(int i)
953953
uint32_t total_sectors;
954954
#endif
955955
struct stat *stat_buf;
956-
#ifdef HDIO_GETGIO
956+
#ifdef HDIO_GETGEO
957957
struct hd_geometry geom;
958958
#endif
959959
#if !defined(WITH_ANDROID) && defined(__linux__)
@@ -1062,7 +1062,7 @@ int get_device_info(int i)
10621062
dev->total_sectors /= dev->sector_size;
10631063

10641064
if (i == 0) {
1065-
#ifdef HDIO_GETGIO
1065+
#ifdef HDIO_GETGEO
10661066
if (ioctl(fd, HDIO_GETGEO, &geom) < 0)
10671067
c.start_sector = 0;
10681068
else

tools/fibmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void stat_bdev(struct stat *st, unsigned int *start_lba)
8888
#endif
8989
{
9090
struct stat bdev_stat;
91-
#ifdef HDIO_GETGIO
91+
#ifdef HDIO_GETGEO
9292
struct hd_geometry geom;
9393
#endif
9494
char devname[32] = { 0, };
@@ -105,7 +105,7 @@ static void stat_bdev(struct stat *st, unsigned int *start_lba)
105105
goto out;
106106

107107
if (S_ISBLK(bdev_stat.st_mode)) {
108-
#ifdef HDIO_GETGIO
108+
#ifdef HDIO_GETGEO
109109
if (ioctl(fd, HDIO_GETGEO, &geom) < 0)
110110
*start_lba = 0;
111111
else

0 commit comments

Comments
 (0)