diff mbox series

[RFC,kvmtool,v1,04/32] Rename parameter in mmap_anon_or_hugetlbfs()

Message ID 20221202174417.1310826-5-tabba@google.com (mailing list archive)
State New, archived
Headers show
Series Add support for restricted guest memory in kvmtool | expand

Commit Message

Fuad Tabba Dec. 2, 2022, 5:43 p.m. UTC
For consistency with other similar functions in the same file.

No functional change intended.

Signed-off-by: Fuad Tabba <tabba@google.com>
---
 util/util.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/util/util.c b/util/util.c
index 7a3fd62..9f9642e 100644
--- a/util/util.c
+++ b/util/util.c
@@ -81,7 +81,7 @@  void die_perror(const char *s)
 	exit(1);
 }
 
-static void *mmap_hugetlbfs(struct kvm *kvm, const char *htlbfs_path, u64 size)
+static void *mmap_hugetlbfs(struct kvm *kvm, const char *hugetlbfs_path, u64 size)
 {
 	char mpath[PATH_MAX];
 	int fd;
@@ -89,11 +89,11 @@  static void *mmap_hugetlbfs(struct kvm *kvm, const char *htlbfs_path, u64 size)
 	void *addr;
 	unsigned long blk_size;
 
-	if (statfs(htlbfs_path, &sfs) < 0)
-		die("Can't stat %s", htlbfs_path);
+	if (statfs(hugetlbfs_path, &sfs) < 0)
+		die("Can't stat %s", hugetlbfs_path);
 
 	if ((unsigned int)sfs.f_type != HUGETLBFS_MAGIC)
-		die("%s is not hugetlbfs!", htlbfs_path);
+		die("%s is not hugetlbfs!", hugetlbfs_path);
 
 	blk_size = (unsigned long)sfs.f_bsize;
 	if (sfs.f_bsize == 0 || blk_size > size) {
@@ -103,7 +103,7 @@  static void *mmap_hugetlbfs(struct kvm *kvm, const char *htlbfs_path, u64 size)
 
 	kvm->ram_pagesize = blk_size;
 
-	snprintf(mpath, PATH_MAX, "%s/kvmtoolXXXXXX", htlbfs_path);
+	snprintf(mpath, PATH_MAX, "%s/kvmtoolXXXXXX", hugetlbfs_path);
 	fd = mkstemp(mpath);
 	if (fd < 0)
 		die("Can't open %s for hugetlbfs map", mpath);