30 lines
781 B
Diff
30 lines
781 B
Diff
From 9b1d5d040d82db567c9ab0ea2b271b6d12e8969f Mon Sep 17 00:00:00 2001
|
|
From: Nicolas Melot <nicolas.melot@ericsson.com>
|
|
Date: Sun, 1 Aug 2021 19:20:58 +0200
|
|
Subject: [PATCH] Forward value of sector_size instead of its address in
|
|
blkdev_get_physector_size
|
|
|
|
---
|
|
lib/blkdev.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/blkdev.c b/lib/blkdev.c
|
|
index c22853d..2d02fb8 100644
|
|
--- a/lib/blkdev.c
|
|
+++ b/lib/blkdev.c
|
|
@@ -222,8 +222,10 @@ int blkdev_get_sector_size(int fd __attribute__((__unused__)), int *sector_size)
|
|
#ifdef BLKPBSZGET
|
|
int blkdev_get_physector_size(int fd, int *sector_size)
|
|
{
|
|
- if (ioctl(fd, BLKPBSZGET, §or_size) >= 0)
|
|
+ if (ioctl(fd, BLKPBSZGET, sector_size) >= 0)
|
|
+ {
|
|
return 0;
|
|
+ }
|
|
return -1;
|
|
}
|
|
#else
|
|
--
|
|
1.8.3.1
|
|
|