* master - improve get_fs_block_size string to number
@ 2020-06-11 20:06 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2020-06-11 20:06 UTC (permalink / raw)
To: lvm-devel
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8e2938c963bb8226b72297647bef89895e5ae548
Commit: 8e2938c963bb8226b72297647bef89895e5ae548
Parent: 9f38e95a2f84f148dae1a8ec440adc29eb12d513
Author: David Teigland <teigland@redhat.com>
AuthorDate: Thu Jun 11 15:05:47 2020 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Thu Jun 11 15:05:47 2020 -0500
improve get_fs_block_size string to number
---
lib/device/dev-type.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index e3fa9babb..896821de8 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -650,11 +650,9 @@ out:
int get_fs_block_size(struct device *dev, uint32_t *fs_block_size)
{
char *block_size_str = NULL;
- uint64_t block_size_val;
if ((block_size_str = blkid_get_tag_value(NULL, "BLOCK_SIZE", dev_name(dev)))) {
- block_size_val = strtoull(block_size_str, NULL, 10);
- *fs_block_size = (uint32_t)block_size_val;
+ *fs_block_size = (uint32_t)atoi(block_size_str);
free(block_size_str);
log_debug("Found blkid BLOCK_SIZE %u for fs on %s", *fs_block_size, dev_name(dev));
return 1;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-11 20:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-11 20:06 master - improve get_fs_block_size string to number David Teigland
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.