3
0
Fork 0
forked from mirrors/nixpkgs

prl-tools: add patch against 6.0

This commit is contained in:
Weijia Wang 2022-10-05 15:11:22 +02:00
parent 979a581e10
commit f88f295bdf
2 changed files with 17 additions and 0 deletions

View file

@ -34,6 +34,10 @@ stdenv.mkDerivation rec {
sha256 = "sha256-igIRWLKbgU8pQrsK+lyjP8aodylXjRrRlOlaP5KbHm8=";
};
patches = lib.optionals (lib.versionAtLeast kernel.version "6.0") [
./prl-tools-6.0.patch
];
hardeningDisable = [ "pic" "format" ];
nativeBuildInputs = [ p7zip undmg perl bbe autoPatchelfHook ]

View file

@ -0,0 +1,13 @@
diff --git a/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c b/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c
index baa8a19..6788791 100644
--- a/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c
+++ b/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c
@@ -306,7 +306,7 @@ int seq_show(struct seq_file *file, void *data)
char buf[BDEVNAME_SIZE];
fsb = list_entry((struct list_head*)data, struct frozen_sb, list);
- bdevname(fsb->sb->s_bdev, buf);
+ snprintf(buf, sizeof(buf), "%pg", fsb->sb->s_bdev);
seq_printf(file, "%s\n", buf);
return 0;
}