|
|
9ae3a8 |
From aabe8208c6a3989910d5ab210eba9b7938bdf526 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 13 Dec 2017 13:39:09 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 38/41] Fix typo in variable name (found and fixed by
|
|
|
9ae3a8 |
codespell)
|
|
|
9ae3a8 |
MIME-Version: 1.0
|
|
|
9ae3a8 |
Content-Type: text/plain; charset=UTF-8
|
|
|
9ae3a8 |
Content-Transfer-Encoding: 8bit
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Message-id: <20171213133912.26176-39-marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 78388
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.5 qemu-kvm PATCH v3 38/41] Fix typo in variable name (found and fixed by codespell)
|
|
|
9ae3a8 |
Bugzilla: 1411490
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Stefan Weil <sw@weilnetz.de>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
|
9ae3a8 |
Reviewed-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
(cherry picked from commit 1d817db3a07774999606f62aa2d8772a82363551)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RHEL: backported to avoid conflicts in following patch
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
scripts/dump-guest-memory.py | 64 ++++++++++++++++++++++----------------------
|
|
|
9ae3a8 |
1 file changed, 32 insertions(+), 32 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
|
|
|
9ae3a8 |
index 308cfca..03d692d 100644
|
|
|
9ae3a8 |
--- a/scripts/dump-guest-memory.py
|
|
|
9ae3a8 |
+++ b/scripts/dump-guest-memory.py
|
|
|
9ae3a8 |
@@ -56,44 +56,44 @@ class ELF(object):
|
|
|
9ae3a8 |
self.notes = []
|
|
|
9ae3a8 |
self.segments = []
|
|
|
9ae3a8 |
self.notes_size = 0
|
|
|
9ae3a8 |
- self.endianess = None
|
|
|
9ae3a8 |
+ self.endianness = None
|
|
|
9ae3a8 |
self.elfclass = ELFCLASS64
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if arch == 'aarch64-le':
|
|
|
9ae3a8 |
- self.endianess = ELFDATA2LSB
|
|
|
9ae3a8 |
+ self.endianness = ELFDATA2LSB
|
|
|
9ae3a8 |
self.elfclass = ELFCLASS64
|
|
|
9ae3a8 |
- self.ehdr = get_arch_ehdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ self.ehdr = get_arch_ehdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
self.ehdr.e_machine = EM_AARCH
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
elif arch == 'aarch64-be':
|
|
|
9ae3a8 |
- self.endianess = ELFDATA2MSB
|
|
|
9ae3a8 |
- self.ehdr = get_arch_ehdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ self.endianness = ELFDATA2MSB
|
|
|
9ae3a8 |
+ self.ehdr = get_arch_ehdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
self.ehdr.e_machine = EM_AARCH
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
elif arch == 'X86_64':
|
|
|
9ae3a8 |
- self.endianess = ELFDATA2LSB
|
|
|
9ae3a8 |
- self.ehdr = get_arch_ehdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ self.endianness = ELFDATA2LSB
|
|
|
9ae3a8 |
+ self.ehdr = get_arch_ehdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
self.ehdr.e_machine = EM_X86_64
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
elif arch == '386':
|
|
|
9ae3a8 |
- self.endianess = ELFDATA2LSB
|
|
|
9ae3a8 |
+ self.endianness = ELFDATA2LSB
|
|
|
9ae3a8 |
self.elfclass = ELFCLASS32
|
|
|
9ae3a8 |
- self.ehdr = get_arch_ehdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ self.ehdr = get_arch_ehdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
self.ehdr.e_machine = EM_386
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
elif arch == 's390':
|
|
|
9ae3a8 |
- self.endianess = ELFDATA2MSB
|
|
|
9ae3a8 |
- self.ehdr = get_arch_ehdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ self.endianness = ELFDATA2MSB
|
|
|
9ae3a8 |
+ self.ehdr = get_arch_ehdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
self.ehdr.e_machine = EM_S390
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
elif arch == 'ppc64-le':
|
|
|
9ae3a8 |
- self.endianess = ELFDATA2LSB
|
|
|
9ae3a8 |
- self.ehdr = get_arch_ehdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ self.endianness = ELFDATA2LSB
|
|
|
9ae3a8 |
+ self.ehdr = get_arch_ehdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
self.ehdr.e_machine = EM_PPC64
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
elif arch == 'ppc64-be':
|
|
|
9ae3a8 |
- self.endianess = ELFDATA2MSB
|
|
|
9ae3a8 |
- self.ehdr = get_arch_ehdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ self.endianness = ELFDATA2MSB
|
|
|
9ae3a8 |
+ self.ehdr = get_arch_ehdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
self.ehdr.e_machine = EM_PPC64
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
else:
|
|
|
9ae3a8 |
@@ -107,7 +107,7 @@ class ELF(object):
|
|
|
9ae3a8 |
def add_note(self, n_name, n_desc, n_type):
|
|
|
9ae3a8 |
"""Adds a note to the ELF."""
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- note = get_arch_note(self.endianess, len(n_name), len(n_desc))
|
|
|
9ae3a8 |
+ note = get_arch_note(self.endianness, len(n_name), len(n_desc))
|
|
|
9ae3a8 |
note.n_namesz = len(n_name) + 1
|
|
|
9ae3a8 |
note.n_descsz = len(n_desc)
|
|
|
9ae3a8 |
note.n_name = n_name.encode()
|
|
|
9ae3a8 |
@@ -126,7 +126,7 @@ class ELF(object):
|
|
|
9ae3a8 |
def add_segment(self, p_type, p_paddr, p_size):
|
|
|
9ae3a8 |
"""Adds a segment to the elf."""
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- phdr = get_arch_phdr(self.endianess, self.elfclass)
|
|
|
9ae3a8 |
+ phdr = get_arch_phdr(self.endianness, self.elfclass)
|
|
|
9ae3a8 |
phdr.p_type = p_type
|
|
|
9ae3a8 |
phdr.p_paddr = p_paddr
|
|
|
9ae3a8 |
phdr.p_filesz = p_size
|
|
|
9ae3a8 |
@@ -158,10 +158,10 @@ class ELF(object):
|
|
|
9ae3a8 |
elf_file.write(note)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-def get_arch_note(endianess, len_name, len_desc):
|
|
|
9ae3a8 |
- """Returns a Note class with the specified endianess."""
|
|
|
9ae3a8 |
+def get_arch_note(endianness, len_name, len_desc):
|
|
|
9ae3a8 |
+ """Returns a Note class with the specified endianness."""
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- if endianess == ELFDATA2LSB:
|
|
|
9ae3a8 |
+ if endianness == ELFDATA2LSB:
|
|
|
9ae3a8 |
superclass = ctypes.LittleEndianStructure
|
|
|
9ae3a8 |
else:
|
|
|
9ae3a8 |
superclass = ctypes.BigEndianStructure
|
|
|
9ae3a8 |
@@ -193,20 +193,20 @@ class Ident(ctypes.Structure):
|
|
|
9ae3a8 |
('ei_abiversion', ctypes.c_ubyte),
|
|
|
9ae3a8 |
('ei_pad', ctypes.c_ubyte * 7)]
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- def __init__(self, endianess, elfclass):
|
|
|
9ae3a8 |
+ def __init__(self, endianness, elfclass):
|
|
|
9ae3a8 |
self.ei_mag0 = 0x7F
|
|
|
9ae3a8 |
self.ei_mag1 = ord('E')
|
|
|
9ae3a8 |
self.ei_mag2 = ord('L')
|
|
|
9ae3a8 |
self.ei_mag3 = ord('F')
|
|
|
9ae3a8 |
self.ei_class = elfclass
|
|
|
9ae3a8 |
- self.ei_data = endianess
|
|
|
9ae3a8 |
+ self.ei_data = endianness
|
|
|
9ae3a8 |
self.ei_version = EV_CURRENT
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-def get_arch_ehdr(endianess, elfclass):
|
|
|
9ae3a8 |
- """Returns a EHDR64 class with the specified endianess."""
|
|
|
9ae3a8 |
+def get_arch_ehdr(endianness, elfclass):
|
|
|
9ae3a8 |
+ """Returns a EHDR64 class with the specified endianness."""
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- if endianess == ELFDATA2LSB:
|
|
|
9ae3a8 |
+ if endianness == ELFDATA2LSB:
|
|
|
9ae3a8 |
superclass = ctypes.LittleEndianStructure
|
|
|
9ae3a8 |
else:
|
|
|
9ae3a8 |
superclass = ctypes.BigEndianStructure
|
|
|
9ae3a8 |
@@ -231,12 +231,12 @@ def get_arch_ehdr(endianess, elfclass):
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
def __init__(self):
|
|
|
9ae3a8 |
super(superclass, self).__init__()
|
|
|
9ae3a8 |
- self.e_ident = Ident(endianess, elfclass)
|
|
|
9ae3a8 |
+ self.e_ident = Ident(endianness, elfclass)
|
|
|
9ae3a8 |
self.e_type = ET_CORE
|
|
|
9ae3a8 |
self.e_version = EV_CURRENT
|
|
|
9ae3a8 |
self.e_ehsize = ctypes.sizeof(self)
|
|
|
9ae3a8 |
self.e_phoff = ctypes.sizeof(self)
|
|
|
9ae3a8 |
- self.e_phentsize = ctypes.sizeof(get_arch_phdr(endianess, elfclass))
|
|
|
9ae3a8 |
+ self.e_phentsize = ctypes.sizeof(get_arch_phdr(endianness, elfclass))
|
|
|
9ae3a8 |
self.e_phnum = 0
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -260,12 +260,12 @@ def get_arch_ehdr(endianess, elfclass):
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
def __init__(self):
|
|
|
9ae3a8 |
super(superclass, self).__init__()
|
|
|
9ae3a8 |
- self.e_ident = Ident(endianess, elfclass)
|
|
|
9ae3a8 |
+ self.e_ident = Ident(endianness, elfclass)
|
|
|
9ae3a8 |
self.e_type = ET_CORE
|
|
|
9ae3a8 |
self.e_version = EV_CURRENT
|
|
|
9ae3a8 |
self.e_ehsize = ctypes.sizeof(self)
|
|
|
9ae3a8 |
self.e_phoff = ctypes.sizeof(self)
|
|
|
9ae3a8 |
- self.e_phentsize = ctypes.sizeof(get_arch_phdr(endianess, elfclass))
|
|
|
9ae3a8 |
+ self.e_phentsize = ctypes.sizeof(get_arch_phdr(endianness, elfclass))
|
|
|
9ae3a8 |
self.e_phnum = 0
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
# End get_arch_ehdr
|
|
|
9ae3a8 |
@@ -275,10 +275,10 @@ def get_arch_ehdr(endianess, elfclass):
|
|
|
9ae3a8 |
return EHDR32()
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-def get_arch_phdr(endianess, elfclass):
|
|
|
9ae3a8 |
- """Returns a 32 or 64 bit PHDR class with the specified endianess."""
|
|
|
9ae3a8 |
+def get_arch_phdr(endianness, elfclass):
|
|
|
9ae3a8 |
+ """Returns a 32 or 64 bit PHDR class with the specified endianness."""
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- if endianess == ELFDATA2LSB:
|
|
|
9ae3a8 |
+ if endianness == ELFDATA2LSB:
|
|
|
9ae3a8 |
superclass = ctypes.LittleEndianStructure
|
|
|
9ae3a8 |
else:
|
|
|
9ae3a8 |
superclass = ctypes.BigEndianStructure
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|