From b20e52014d0bec59a90e4513262b17bcb51bd792 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Mon, 11 Mar 2024 22:24:34 +0100 Subject: [PATCH] =?UTF-8?q?bin/pathof=20:=20ajout=20possibilit=C3=A9=20de?= =?UTF-8?q?=20r=C3=A9cup=C3=A9rer=20le=20chemin=20d'un=20dossier=20partag?= =?UTF-8?q?=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qemu/bin/pathof | 3 +++ qemu/launchers/9p | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu/bin/pathof b/qemu/bin/pathof index dbed3d5..14138e2 100755 --- a/qemu/bin/pathof +++ b/qemu/bin/pathof @@ -23,6 +23,9 @@ case "$1" in spice) basedir=sockets/spice ;; + shared) + basedir=shared + ;; *) false ;; diff --git a/qemu/launchers/9p b/qemu/launchers/9p index c5078d8..d5f8b43 100755 --- a/qemu/launchers/9p +++ b/qemu/launchers/9p @@ -11,9 +11,11 @@ if (defined $ENV{'QEMUSH_BASE'}) { my $base = shift @launchers_chain; $ENV{'QEMUSH_BASE'} = join ",", @launchers_chain; +chomp(my $shared_folder = `pathof shared`); + my @command = ( $base, - "-fsdev", "local,security_model=passthrough,id=fsdev0,path=" . $ENV{'HOME'} . "/shared/" . $ENV{'QEMUSH_NAME'}, + "-fsdev", "local,security_model=passthrough,id=fsdev0,path=${shared_folder}", "-device", "virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=shared", @ARGV );