From patchwork Thu Jul 8 17:25:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 12365811 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDC92C07E96 for ; Thu, 8 Jul 2021 17:27:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A48C961874 for ; Thu, 8 Jul 2021 17:27:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A48C961874 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1XoQ-0001d6-S5 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:27:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1XmZ-0007hx-JN for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:25:52 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:52015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1XmY-0005W9-32 for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:25:51 -0400 Received: by mail-pj1-x1034.google.com with SMTP id n11so4044458pjo.1 for ; Thu, 08 Jul 2021 10:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KxvTLSU1IwRTYkOMS6dRGl4OQuHqSkLV4qmVQ6tKy4k=; b=oqXof65H9ZAKTeY2wu7MfjUSbYNnYJR+FXwYVmJOdWpPiF6akVt+IQOaLijR10aWz7 3F+HJmNbykwfuKqaFEfTAYrGc4RIctA5l+zwJOelSORYQCkSQCP99uD2xZF9UkTCIzTN 6WTkSU0t0snomF3CryX1NmpIxO+EX3Pa97t1YIHzFqTcuHViiqjOLlq1s2QiPyZou+2d V4W/wadlb/QOijnKNqZYpz0OZP0mky9hHlRNxo5M4bxyzpziDgxM5fSlXhVORS1lqOVP 5Bs4PdMWdGUtBT9mzSQkdpx2WfepdLrngN7xfaPYaYJVsu48NDS5iVxWLxpRva/5YP2e IPtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KxvTLSU1IwRTYkOMS6dRGl4OQuHqSkLV4qmVQ6tKy4k=; b=hHtq5dK3wNzDbif0tclObr2EHUJo0yXB5d1RKaaWCd6xRTP6L6xut0yk2V7M791dAf Jz5kihhPxxTgbbgmn7ig+gEbR7/95v/DThYZCxvPLIwTp9dF7ES5tTGuZQJ4Ff39Mvl/ h87Rs6Y+DksYxQAk/xAMXTeDnK0BZUcY/xgyop/k1NWzHxcR8B5Rwnz8uB0Q1DdKxnIM dCT0vM/cAMAdBB2Ji2AtZgPVh2uoWmugDFTmFCBpuQAFikD6HrR2I+L1VeC+4etucZM4 0Wa9ZvG8Waeg9RELaFCwuWnOLww8PEC6T7Y1CDcSmcKquKTV8hBGTttNSVFIUg7meRXW 8Gpw== X-Gm-Message-State: AOAM531DEkYXwOr9yVnz9WmBek625GiEsx3/KKE3eCNNXSUE5nVuCkKy 7WG+ATlOoOM+OcX6DuvebCfTEOIBtGv7FA== X-Google-Smtp-Source: ABdhPJyI6Xk/kA1YJuAcezysrH7kIiC6dL6hEJOTe2zEDrgaHzhHPXfOqn+vyEHbMpPVrEuFCuKPaA== X-Received: by 2002:a17:90a:9282:: with SMTP id n2mr6022498pjo.92.1625765148644; Thu, 08 Jul 2021 10:25:48 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c360:8200:7947:37f7:fd02:9c0c]) by smtp.gmail.com with ESMTPSA id c20sm3579429pfd.64.2021.07.08.10.25.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jul 2021 10:25:48 -0700 (PDT) From: Akihiko Odaki To: Subject: [PATCH 1/4] cutils: Introduce bundle mechanism Date: Fri, 9 Jul 2021 02:25:38 +0900 Message-Id: <20210708172541.29530-1-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=akihiko.odaki@gmail.com; helo=mail-pj1-x1034.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Jason Wang , qemu-devel@nongnu.org, Programmingkid , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. Signed-off-by: Akihiko Odaki --- include/qemu/cutils.h | 19 +++++++++++++++++++ util/cutils.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index 986ed8e15f4..6060e56b877 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -209,4 +209,23 @@ int qemu_pstrcmp0(const char **str1, const char **str2); */ char *get_relocated_path(const char *dir); +/** + * find_bundle: + * @path: Relative path + * + * Returns a path for the specified directory or file bundled in QEMU. It uses + * the directory of the running executable as the prefix first. See + * get_relocated_path() for the details. The next candidate is "qemu-bundle" + * directory in the directory of the running executable. "qemu-bundle" + * directory is typically present in the build tree. + * + * The returned string should be freed by the caller. + * + * Returns: a path that can access the bundle, or NULL if no matching bundle + * exists. + */ +char *find_bundle(const char *path); + +void list_bundle_candidates(const char *path); + #endif diff --git a/util/cutils.c b/util/cutils.c index c9b91e7535a..b4e4cda71c8 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -1057,3 +1057,36 @@ char *get_relocated_path(const char *dir) } return g_string_free(result, false); } + +static const char * const bundle_formats[] = { + "%s" G_DIR_SEPARATOR_S ".." G_DIR_SEPARATOR_S "%s", + "%s" G_DIR_SEPARATOR_S "qemu-bundle" G_DIR_SEPARATOR_S "%s" +}; + +char *find_bundle(const char *path) +{ + const char *dir = qemu_get_exec_dir(); + char *candidate; + int i; + + for (i = 0; i < ARRAY_SIZE(bundle_formats); i++) { + candidate = g_strdup_printf(bundle_formats[i], dir, path); + if (access(candidate, R_OK) == 0) { + return candidate; + } + g_free(candidate); + } + + return NULL; +} + +void list_bundle_candidates(const char *path) +{ + const char *dir = qemu_get_exec_dir(); + int i; + + for (i = 0; i < ARRAY_SIZE(bundle_formats); i++) { + printf(bundle_formats[i], dir, path); + putc('\n', stdout); + } +} From patchwork Thu Jul 8 17:25:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 12365971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29BAAC07E96 for ; Thu, 8 Jul 2021 17:59:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ACDB7613AE for ; Thu, 8 Jul 2021 17:59:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACDB7613AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1YJ8-0001z1-Nt for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:59:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Xmd-0007kh-2P for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:25:55 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:35770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Xma-0005Xv-QN for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:25:54 -0400 Received: by mail-pj1-x1036.google.com with SMTP id h1-20020a17090a3d01b0290172d33bb8bcso6422037pjc.0 for ; Thu, 08 Jul 2021 10:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LQbJ6tvxgtSuK82AYiemIK41Tl8sHz5A/wPUWSQw+Ko=; b=PVSmOLIBVb25pmjBW/0SNz0jWOpAVuhOwxUI/ddD9j/Leuj46Xqk6gfwAg4jbLsY1U i2bhFy9lSNHb0Uyp91Pjhpt5qgDr2Q9AxES0eZo4YaNlnLXeCY0LDvPqTqOqCS4sXE/0 u41uYmN4/oVVFG0oLAhiG1IzCuI8crBPRvoHNfcVFGGBI2lmo4OtaU558MfNRB2MItMo KcJHbjvZsDoF0ne5holSbHNsPjF1EZkbjLjbgFw93whO9Ly/fwjUupH590SHyp1yg4YH lljEhRynyISGnOXZ26rJB53s/M8v+UPyNTG3+y+K+3QgdVdsQ/mB6IOrg+BQ66FY+PFY j5QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LQbJ6tvxgtSuK82AYiemIK41Tl8sHz5A/wPUWSQw+Ko=; b=Hz8kTDitp7zrI+aU7UN7uWKsJaR2miikjPDrQ/KMH+0Nbxsga+wWMjA8v1XdKqDiDl 9qjPp0y/vqEALxR+2/kATd0UeC3+YJFLDpsPNwv89WeBu+UmT+w2fYmMeWjCOAT28lLN Vjf+ekMOPrfF5yZaoIbA6lgeEaN1EM2jciW1GhzzWzgDmqzmNfTqdFElgwC6QYhbeHuC EOrO9p0SkGjsid+c11SGdKBiQYlg9+BH+YkuJh1F0kklkH0VVLELw5s6Jx3mi6nf0YoK b6KhYzNFKxV/L9chfmoQKGJOZYBK3NMUJ9AVppDY+KRLK7/fd9GnUyk4FFCkxdgQ0oaj b1Jg== X-Gm-Message-State: AOAM531MIDbq8NAj78lG6t06uHDvAZZJTkkk1c6n7e1cKKiBtlr8G245 FRIxug2ho38WwAAwGDx0Wd6wE7QQzUXJjA== X-Google-Smtp-Source: ABdhPJy7vxz/zk8dLj+jp6NYTA21lSjJNiC4uxfXqduZ2js8s7Q7zb+BPv5tiiEZfCuibLYVBZUDVw== X-Received: by 2002:a17:902:768c:b029:128:b109:d0d8 with SMTP id m12-20020a170902768cb0290128b109d0d8mr26893909pll.19.1625765150977; Thu, 08 Jul 2021 10:25:50 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c360:8200:7947:37f7:fd02:9c0c]) by smtp.gmail.com with ESMTPSA id c20sm3579429pfd.64.2021.07.08.10.25.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jul 2021 10:25:50 -0700 (PDT) From: Akihiko Odaki To: Subject: [PATCH 2/4] datadir: Use bundle mechanism Date: Fri, 9 Jul 2021 02:25:39 +0900 Message-Id: <20210708172541.29530-2-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20210708172541.29530-1-akihiko.odaki@gmail.com> References: <20210708172541.29530-1-akihiko.odaki@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=akihiko.odaki@gmail.com; helo=mail-pj1-x1036.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Jason Wang , qemu-devel@nongnu.org, Programmingkid , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" bundle mechanism and softmmu/datadir.c provides some overlapped functionality. Use bundle mechanism in softmmu/datadir.c to remove the redundancy. Signed-off-by: Akihiko Odaki --- configure | 2 ++ meson.build | 2 +- softmmu/datadir.c | 35 ++++++++++++----------------------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 650d9c07358..cff5a8ac280 100755 --- a/configure +++ b/configure @@ -5058,6 +5058,8 @@ for f in $UNLINK ; do fi done +symlink ../../pc-bios qemu-bundle/share/qemu + (for i in $cross_cc_vars; do export $i done diff --git a/meson.build b/meson.build index 877d4fa0b6a..44adc660e23 100644 --- a/meson.build +++ b/meson.build @@ -1197,7 +1197,7 @@ endif config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_option('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_confdir) -config_host_data.set_quoted('CONFIG_QEMU_DATADIR', get_option('prefix') / qemu_datadir) +config_host_data.set_quoted('CONFIG_QEMU_BUNDLE_DATADIR', qemu_datadir) config_host_data.set_quoted('CONFIG_QEMU_DESKTOPDIR', get_option('prefix') / qemu_desktopdir) config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('qemu_firmwarepath')) config_host_data.set_quoted('CONFIG_QEMU_HELPERDIR', get_option('prefix') / get_option('libexecdir')) diff --git a/softmmu/datadir.c b/softmmu/datadir.c index 504c4665bed..2d8366039d9 100644 --- a/softmmu/datadir.c +++ b/softmmu/datadir.c @@ -36,6 +36,7 @@ char *qemu_find_file(int type, const char *name) int i; const char *subdir; char *buf; + char *bundle; /* Try the name as a straight path first */ if (access(name, R_OK) == 0) { @@ -62,6 +63,16 @@ char *qemu_find_file(int type, const char *name) } g_free(buf); } + + bundle = g_strdup_printf("%s/%s%s", + CONFIG_QEMU_BUNDLE_DATADIR, subdir, name); + buf = find_bundle(bundle); + g_free(bundle); + if (buf) { + trace_load_file(name, buf); + return buf; + } + return NULL; } @@ -84,26 +95,6 @@ void qemu_add_data_dir(char *path) data_dir[data_dir_idx++] = path; } -/* - * Find a likely location for support files using the location of the binary. - * When running from the build tree this will be "$bindir/pc-bios". - * Otherwise, this is CONFIG_QEMU_DATADIR (possibly relocated). - * - * The caller must use g_free() to free the returned data when it is - * no longer required. - */ -static char *find_datadir(void) -{ - g_autofree char *dir = NULL; - - dir = g_build_filename(qemu_get_exec_dir(), "pc-bios", NULL); - if (g_file_test(dir, G_FILE_TEST_IS_DIR)) { - return g_steal_pointer(&dir); - } - - return get_relocated_path(CONFIG_QEMU_DATADIR); -} - void qemu_add_default_firmwarepath(void) { char **dirs; @@ -115,9 +106,6 @@ void qemu_add_default_firmwarepath(void) qemu_add_data_dir(get_relocated_path(dirs[i])); } g_strfreev(dirs); - - /* try to find datadir relative to the executable path */ - qemu_add_data_dir(find_datadir()); } void qemu_list_data_dirs(void) @@ -126,4 +114,5 @@ void qemu_list_data_dirs(void) for (i = 0; i < data_dir_idx; i++) { printf("%s\n", data_dir[i]); } + list_bundle_candidates(CONFIG_QEMU_BUNDLE_DATADIR); } From patchwork Thu Jul 8 17:25:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 12365987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72E7DC07E96 for ; Thu, 8 Jul 2021 18:03:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C7A35613AE for ; Thu, 8 Jul 2021 18:03:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C7A35613AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1YNL-0000TQ-VJ for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 14:03:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Xme-0007nm-Gj for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:25:56 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:45788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Xmc-0005aM-Ir for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:25:56 -0400 Received: by mail-pl1-x630.google.com with SMTP id p17so2878736plf.12 for ; Thu, 08 Jul 2021 10:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tSM/Cp2WLt9oPifX9I5a3abc81SiA3RuI+QQhdWcm/I=; b=utD2GbPKLz7uoCA1roh0U0mrB5qJnkavYvZaKSVwT99IgW55qIEnycRZ48wUAB+K/L 0XWkqD+j0XwUeHT8XpkoBndokOicafWZYpAAPiCpR7tswMF8wHq31FMZqsf50SrTIclO L0cWzWub8Gi6Wkd+uEQwf830WA5D5o7UIX0RE9ZwH8pMK158s17n3iqM7ogaqVSoqHWn K8+9T52bV4vnkSpfvVbSDRjq6980YPJNxzqioRS+G+EFNDjNQUs+oYiQwSiF6jZHDxRS Va48sJayL8Z7lru3QDECuPuaWP2J5v5IMfooqllOCNUWSBiH77W4EZtjcFamg67GwOS0 iE0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tSM/Cp2WLt9oPifX9I5a3abc81SiA3RuI+QQhdWcm/I=; b=OivZnrSIhrVIJz13zWr/z1j8i3TJ5Pt+kd6z89060qQqEhZRvxo8WP5Z3qpNcVSWeB fZw9yPMM5lTMj5XNgceAlQZXxMfcZ0ISSjmlkynfy6HPx0wthiopuE+RGgE+Fzn1QFMW RLLOxafllTCxnXaaqk2/cQeRhMtJGLo8HZkHqS2DxgGq8KP5Q3QEgZOIBUD4j73ylt9L 1p5cS2tCsV1I96cam/Jvq1dFtmmGMRNObC19UfN4DBnkq3lgXsx8uijjfFzeYaBzj7XQ l5AHUKJoAkXLTAhEpnK5+NxJJ4jibwAm5mGI49LFsIfV7SrLzFkF38SAE5najc5KhZsh DhrQ== X-Gm-Message-State: AOAM532HlR8xKhsJlLopuvrkMbeURr3pCplL7u3EjgmvXRmOcgC598nU S168hBYGGKfZ+bxInVitq25wfUJFB92ivA== X-Google-Smtp-Source: ABdhPJyV+de/2qZm0BLsZrGu4sv6BKaO3FDov1tOfSgN72EagPS6a7yFIpfkstcJJLksfeSSoBEglg== X-Received: by 2002:a17:902:e88a:b029:129:7624:1fa5 with SMTP id w10-20020a170902e88ab029012976241fa5mr23167265plg.2.1625765153046; Thu, 08 Jul 2021 10:25:53 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c360:8200:7947:37f7:fd02:9c0c]) by smtp.gmail.com with ESMTPSA id c20sm3579429pfd.64.2021.07.08.10.25.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jul 2021 10:25:52 -0700 (PDT) From: Akihiko Odaki To: Subject: [PATCH 3/4] ui/icons: Use bundle mechanism Date: Fri, 9 Jul 2021 02:25:40 +0900 Message-Id: <20210708172541.29530-3-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20210708172541.29530-1-akihiko.odaki@gmail.com> References: <20210708172541.29530-1-akihiko.odaki@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=akihiko.odaki@gmail.com; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Jason Wang , qemu-devel@nongnu.org, Programmingkid , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Akihiko Odaki --- configure | 10 ++++++++++ meson.build | 3 +-- ui/cocoa.m | 20 +++++++++++--------- ui/gtk.c | 8 +++++--- ui/sdl2.c | 18 +++++++++++------- 5 files changed, 38 insertions(+), 21 deletions(-) diff --git a/configure b/configure index cff5a8ac280..a9f746849ec 100755 --- a/configure +++ b/configure @@ -5058,6 +5058,16 @@ for f in $UNLINK ; do fi done +for icon_extension in bmp png ; do + for icon_file in $source_path/ui/icons/qemu_*.$icon_extension ; do + icon_basename=${icon_file%.$icon_extension} + icon_name=${icon_basename#$source_path/ui/icons/qemu_} + icon_dir=qemu-bundle/share/icons/hicolor/$icon_name/apps + symlink $icon_file $icon_dir/qemu.$icon_extension + done +done + +symlink $source_path/ui/icons/qemu.svg qemu-bundle/share/icons/hicolor/scalable/apps/qemu.svg symlink ../../pc-bios qemu-bundle/share/qemu (for i in $cross_cc_vars; do diff --git a/meson.build b/meson.build index 44adc660e23..6d90fe92bf1 100644 --- a/meson.build +++ b/meson.build @@ -1200,8 +1200,7 @@ config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_c config_host_data.set_quoted('CONFIG_QEMU_BUNDLE_DATADIR', qemu_datadir) config_host_data.set_quoted('CONFIG_QEMU_DESKTOPDIR', get_option('prefix') / qemu_desktopdir) config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('qemu_firmwarepath')) -config_host_data.set_quoted('CONFIG_QEMU_HELPERDIR', get_option('prefix') / get_option('libexecdir')) -config_host_data.set_quoted('CONFIG_QEMU_ICONDIR', get_option('prefix') / qemu_icondir) +config_host_data.set_quoted('CONFIG_QEMU_BUNDLE_ICONDIR', qemu_icondir) config_host_data.set_quoted('CONFIG_QEMU_LOCALEDIR', get_option('prefix') / get_option('localedir')) config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') / get_option('localstatedir')) config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir) diff --git a/ui/cocoa.m b/ui/cocoa.m index 9f72844b079..d459dfaf595 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1477,15 +1477,17 @@ - (void)make_about_window NSRect picture_rect = NSMakeRect(x, y, picture_width, picture_height); /* Make the picture of QEMU */ - NSImageView *picture_view = [[NSImageView alloc] initWithFrame: - picture_rect]; - char *qemu_image_path_c = get_relocated_path(CONFIG_QEMU_ICONDIR "/hicolor/512x512/apps/qemu.png"); - NSString *qemu_image_path = [NSString stringWithUTF8String:qemu_image_path_c]; - g_free(qemu_image_path_c); - NSImage *qemu_image = [[NSImage alloc] initWithContentsOfFile:qemu_image_path]; - [picture_view setImage: qemu_image]; - [picture_view setImageScaling: NSImageScaleProportionallyUpOrDown]; - [superView addSubview: picture_view]; + char *qemu_image_path_c = find_bundle(CONFIG_QEMU_BUNDLE_ICONDIR "/hicolor/512x512/apps/qemu.png"); + if (qemu_image_path_c) { + NSString *qemu_image_path = [NSString stringWithUTF8String:qemu_image_path_c]; + g_free(qemu_image_path_c); + NSImageView *picture_view = [[NSImageView alloc] initWithFrame: + picture_rect]; + NSImage *qemu_image = [[NSImage alloc] initWithContentsOfFile:qemu_image_path]; + [picture_view setImage: qemu_image]; + [picture_view setImageScaling: NSImageScaleProportionallyUpOrDown]; + [superView addSubview: picture_view]; + } /* Make the name label */ NSBundle *bundle = [NSBundle mainBundle]; diff --git a/ui/gtk.c b/ui/gtk.c index 98046f577b9..e250f9e18a0 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2198,9 +2198,11 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) s->opts = opts; theme = gtk_icon_theme_get_default(); - dir = get_relocated_path(CONFIG_QEMU_ICONDIR); - gtk_icon_theme_prepend_search_path(theme, dir); - g_free(dir); + dir = find_bundle(CONFIG_QEMU_BUNDLE_ICONDIR); + if (dir) { + gtk_icon_theme_prepend_search_path(theme, dir); + g_free(dir); + } g_set_prgname("qemu"); s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); diff --git a/ui/sdl2.c b/ui/sdl2.c index a203cb0239e..7b7ed9f9065 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -877,15 +877,19 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) } #ifdef CONFIG_SDL_IMAGE - dir = get_relocated_path(CONFIG_QEMU_ICONDIR "/hicolor/128x128/apps/qemu.png"); - icon = IMG_Load(dir); + dir = find_bundle(CONFIG_QEMU_BUNDLE_ICONDIR "/hicolor/128x128/apps/qemu.png"); + if (dir) { + icon = IMG_Load(dir); + } #else /* Load a 32x32x4 image. White pixels are transparent. */ - dir = get_relocated_path(CONFIG_QEMU_ICONDIR "/hicolor/32x32/apps/qemu.bmp"); - icon = SDL_LoadBMP(dir); - if (icon) { - uint32_t colorkey = SDL_MapRGB(icon->format, 255, 255, 255); - SDL_SetColorKey(icon, SDL_TRUE, colorkey); + dir = find_bundle(CONFIG_QEMU_BUNDLE_ICONDIR "/hicolor/32x32/apps/qemu.bmp"); + if (dir) { + icon = SDL_LoadBMP(dir); + if (icon) { + uint32_t colorkey = SDL_MapRGB(icon->format, 255, 255, 255); + SDL_SetColorKey(icon, SDL_TRUE, colorkey); + } } #endif g_free(dir); From patchwork Thu Jul 8 17:25:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 12365817 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A10CC11F66 for ; Thu, 8 Jul 2021 17:29:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 01E1A616EB for ; Thu, 8 Jul 2021 17:29:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01E1A616EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Xq9-0006Cy-V2 for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 13:29:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Xmg-0007qJ-Np for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:26:00 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:41925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Xme-0005dP-MO for qemu-devel@nongnu.org; Thu, 08 Jul 2021 13:25:58 -0400 Received: by mail-pj1-x1032.google.com with SMTP id oj10-20020a17090b4d8ab0290172f77377ebso4329805pjb.0 for ; Thu, 08 Jul 2021 10:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M5vcKKDVZQYms4uOR9JQB2etWe+O1TO8Yu2POyfw0g0=; b=NX7UGSW1heDex1AJovAXg7y5EroxRzxoxAnCdlixyLfh2KQpbqPdiwEmmfIka8Nm7w 7JIpyZFwPt8p+z2rEE2BZqQ2os6kkDdPPyLZFI/GeVGub8Xllc9cAFsowVeWbC818PUL UYFMKkOv5yHJjuZeQ5RZoruxtNd+4XE12I5oZfV66uhPCUirIermFaV/2Booz4vEYs0T eAflu0kIF5tdFDgPeDF58DF5Yqxx3Z8MMXpmL4RzBhqY3xgViQJRshuGEb9G+ZE0Kwva CbMT/A1KR8QmP8nyOAX505EOouDSz2vDDtoJTow4GTLxbeEmooKJovTEANMuD7mCV/Yd 8fnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M5vcKKDVZQYms4uOR9JQB2etWe+O1TO8Yu2POyfw0g0=; b=lcWQfQlRIHGedGsd7T9DsN/ejqGtjeBu6mFXQupWMNGgyH5JY2AWdzrPKNNP7iyusM m3IrkHX2YC2h93Sq/yoGj9e3fqTowjbaB3dulYRzDp1+9XmLJJode8hPSCcVyo6SWGMq P6XlUViQzVamaFLSSXyOtu3XhcapRdFOfwS9fr1rSOHMa+5ZfEoBThBMsteRM1v2vbYy SQqp/pWbxcXh/rby8R6oGUt0/gxRe9DtKKMkdZcZb6Hj1Eb8J16TYzMPXpsHc3M2GhBX HXkBIhD4CPkuaw3blRZY9YGdvxWJrESS8d9wnutpwG5wVy88I/n5Vi2pCvx7zLL3oPsa c32g== X-Gm-Message-State: AOAM530d9AGWtuNLbSngFgqpAvkwlRpTDq2X05vmLwXUPirtqChw2IOL X4/tKXrPq/Ie793D087qBJVlJpHdIsJagw== X-Google-Smtp-Source: ABdhPJxIMBk6Lf81WqrzEstEOdxWev/pGnCYDOs1olR91Np1uhMj8wDiCJ5b2I6+t/w2MnIiNEbPtQ== X-Received: by 2002:a17:902:7b8c:b029:129:5733:2e3b with SMTP id w12-20020a1709027b8cb029012957332e3bmr26854128pll.4.1625765155333; Thu, 08 Jul 2021 10:25:55 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c360:8200:7947:37f7:fd02:9c0c]) by smtp.gmail.com with ESMTPSA id c20sm3579429pfd.64.2021.07.08.10.25.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jul 2021 10:25:55 -0700 (PDT) From: Akihiko Odaki To: Subject: [PATCH 4/4] net: Use bundle mechanism Date: Fri, 9 Jul 2021 02:25:41 +0900 Message-Id: <20210708172541.29530-4-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20210708172541.29530-1-akihiko.odaki@gmail.com> References: <20210708172541.29530-1-akihiko.odaki@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=akihiko.odaki@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Jason Wang , qemu-devel@nongnu.org, Programmingkid , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Akihiko Odaki --- configure | 1 + include/net/net.h | 2 +- meson.build | 1 + net/tap.c | 6 +++++- qemu-options.hx | 4 ++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configure b/configure index a9f746849ec..aa8e096faaa 100755 --- a/configure +++ b/configure @@ -5069,6 +5069,7 @@ done symlink $source_path/ui/icons/qemu.svg qemu-bundle/share/icons/hicolor/scalable/apps/qemu.svg symlink ../../pc-bios qemu-bundle/share/qemu +symlink ../../qemu-bridge-helper qemu-bundle/libexec/qemu-bridge-helper (for i in $cross_cc_vars; do export $i diff --git a/include/net/net.h b/include/net/net.h index 5d1508081f9..5f701e942b3 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -221,7 +221,7 @@ NetClientState *net_hub_port_find(int hub_id); #define DEFAULT_NETWORK_SCRIPT CONFIG_SYSCONFDIR "/qemu-ifup" #define DEFAULT_NETWORK_DOWN_SCRIPT CONFIG_SYSCONFDIR "/qemu-ifdown" -#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper" +#define DEFAULT_BUNDLE_BRIDGE_HELPER CONFIG_QEMU_BUNDLE_HELPERDIR "/qemu-bridge-helper" #define DEFAULT_BRIDGE_INTERFACE "br0" void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd); diff --git a/meson.build b/meson.build index 6d90fe92bf1..ecfc5bd8c72 100644 --- a/meson.build +++ b/meson.build @@ -1200,6 +1200,7 @@ config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_c config_host_data.set_quoted('CONFIG_QEMU_BUNDLE_DATADIR', qemu_datadir) config_host_data.set_quoted('CONFIG_QEMU_DESKTOPDIR', get_option('prefix') / qemu_desktopdir) config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('qemu_firmwarepath')) +config_host_data.set_quoted('CONFIG_QEMU_BUNDLE_HELPERDIR', get_option('libexecdir')) config_host_data.set_quoted('CONFIG_QEMU_BUNDLE_ICONDIR', qemu_icondir) config_host_data.set_quoted('CONFIG_QEMU_LOCALEDIR', get_option('prefix') / get_option('localedir')) config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') / get_option('localstatedir')) diff --git a/net/tap.c b/net/tap.c index f5686bbf771..be80f29b96b 100644 --- a/net/tap.c +++ b/net/tap.c @@ -508,7 +508,11 @@ static int net_bridge_run_helper(const char *helper, const char *bridge, sigprocmask(SIG_BLOCK, &mask, &oldmask); if (!helper) { - helper = default_helper = get_relocated_path(DEFAULT_BRIDGE_HELPER); + helper = default_helper = find_bundle(DEFAULT_BUNDLE_BRIDGE_HELPER); + if (!helper) { + error_setg(errp, "birdge helper not found"); + return -1; + } } if (socketpair(PF_UNIX, SOCK_STREAM, 0, sv) == -1) { diff --git a/qemu-options.hx b/qemu-options.hx index 8965dabc83e..2f40169e8e9 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2528,7 +2528,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, " to configure it and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n" " to deconfigure it\n" " use '[down]script=no' to disable script execution\n" - " use network helper 'helper' (default=" DEFAULT_BRIDGE_HELPER ") to\n" + " use network helper 'helper' (default=" DEFAULT_BUNDLE_BRIDGE_HELPER ") to\n" " configure it\n" " use 'fd=h' to connect to an already opened TAP interface\n" " use 'fds=x:y:...:z' to connect to already opened multiqueue capable TAP interfaces\n" @@ -2547,7 +2547,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, "-netdev bridge,id=str[,br=bridge][,helper=helper]\n" " configure a host TAP network backend with ID 'str' that is\n" " connected to a bridge (default=" DEFAULT_BRIDGE_INTERFACE ")\n" - " using the program 'helper (default=" DEFAULT_BRIDGE_HELPER ")\n" + " using the program 'helper (default=" DEFAULT_BUNDLE_BRIDGE_HELPER ")\n" #endif #ifdef __linux__ "-netdev l2tpv3,id=str,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport]\n"