From: Ian Jackson Date: Tue, 9 Oct 2018 16:14:34 +0000 (+0100) Subject: tools/pygrub: Add `xen' to fsimage python module name X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3135 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e0178b6017c278eb1d6837d0b38943d1f022a7f3;p=xen.git tools/pygrub: Add `xen' to fsimage python module name This module should be called `libxenfsimage' for the same reasons that the C library should. Signed-off-by: Ian Jackson Acked-by: Wei Liu --- diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py index b58cc1c4e6..b8f1dc4590 100644 --- a/tools/pygrub/setup.py +++ b/tools/pygrub/setup.py @@ -7,7 +7,7 @@ extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] XEN_ROOT = "../.." -fsimage = Extension("fsimage", +xenfsimage = Extension("xenfsimage", extra_compile_args = extra_compile_args, include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], @@ -25,5 +25,5 @@ setup(name='pygrub', package_dir={'grub': 'src', 'fsimage': 'src'}, scripts = ["src/pygrub"], packages=pkgs, - ext_modules = [ fsimage ] + ext_modules = [ xenfsimage ] ) diff --git a/tools/pygrub/src/fsimage/fsimage.c b/tools/pygrub/src/fsimage/fsimage.c index 47940572a8..743a3fb7b8 100644 --- a/tools/pygrub/src/fsimage/fsimage.c +++ b/tools/pygrub/src/fsimage/fsimage.c @@ -132,7 +132,7 @@ static char fsimage_file_type__doc__[] = "Filesystem image file"; PyTypeObject fsimage_file_type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ - "fsimage.file", /* tp_name */ + "xenfsimage.file", /* tp_name */ sizeof(fsimage_file_t), /* tp_size */ 0, /* tp_itemsize */ (destructor) fsimage_file_dealloc, /* tp_dealloc */ @@ -234,7 +234,7 @@ PyDoc_STRVAR(fsimage_fs_type__doc__, "Filesystem image"); PyTypeObject fsimage_fs_type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ - "fsimage.fs", /* tp_name */ + "xenfsimage.fs", /* tp_name */ sizeof(fsimage_fs_t), /* tp_size */ 0, /* tp_itemsize */ (destructor) fsimage_fs_dealloc, /* tp_dealloc */ @@ -317,7 +317,7 @@ static struct PyMethodDef fsimage_module_methods[] = { }; PyMODINIT_FUNC -initfsimage(void) +initxenfsimage(void) { - Py_InitModule("fsimage", fsimage_module_methods); + Py_InitModule("xenfsimage", fsimage_module_methods); } diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index dd0c8f77df..52a8965ad9 100755 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -21,7 +21,7 @@ import xen.lowlevel.xc import curses, _curses, curses.wrapper, curses.textpad, curses.ascii import getopt -import fsimage +import xenfsimage import grub.GrubConf import grub.LiloConf import grub.ExtLinuxConf @@ -897,7 +897,7 @@ if __name__ == "__main__": for offset in part_offs: try: - fs = fsimage.open(file, offset, bootfsoptions) + fs = xenfsimage.open(file, offset, bootfsoptions) chosencfg = sniff_solaris(fs, incfg) @@ -945,7 +945,7 @@ if __name__ == "__main__": args = None if chosencfg["args"]: - zfsinfo = fsimage.getbootstring(fs) + zfsinfo = xenfsimage.getbootstring(fs) if zfsinfo is not None: e = re.compile("zfs-bootfs=[\w\-\.\:@/]+" ) (chosencfg["args"],count) = e.subn(zfsinfo, chosencfg["args"])