From patchwork Thu Feb 2 16:45:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 139185 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0BAACB71A7 for ; Fri, 3 Feb 2012 04:53:46 +1100 (EST) Received: from localhost ([::1]:54541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rszoa-0007g2-KQ for incoming@patchwork.ozlabs.org; Thu, 02 Feb 2012 11:47:16 -0500 Received: from eggs.gnu.org ([140.186.70.92]:35321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rsznk-0005DY-Kw for qemu-devel@nongnu.org; Thu, 02 Feb 2012 11:46:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rsznc-0002b6-UJ for qemu-devel@nongnu.org; Thu, 02 Feb 2012 11:46:24 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:35764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rsznc-0002WX-BF for qemu-devel@nongnu.org; Thu, 02 Feb 2012 11:46:16 -0500 Received: by mail-pz0-f45.google.com with SMTP id p14so2506378dad.4 for ; Thu, 02 Feb 2012 08:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=xthx8Uccda1VH9BTu9VwvMx00SZ8DTS8tgq9rWFR3gk=; b=hO93TVm4ZP78pw/Cz0xX/PIJUFz7Ygo64gLaBpmQH3mSZG/bHhQZHN/fLHpchHeLoq KGJZDpOJhrggQGdPLaLyIfmCsXK913KSiSuunUmrHwd3WPPHNC4Cdmy2G1leXJjHCup9 nGMwfbZUu/fEXPJu9cPRU4NfnHgjkBkksYmN0= Received: by 10.68.226.98 with SMTP id rr2mr8879075pbc.115.1328201175929; Thu, 02 Feb 2012 08:46:15 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-182-16.ip50.fastwebnet.it. [93.34.182.16]) by mx.google.com with ESMTPS id x4sm6756321pbx.16.2012.02.02.08.46.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Feb 2012 08:46:15 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 2 Feb 2012 17:45:34 +0100 Message-Id: <1328201142-26145-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> References: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.45 Subject: [Qemu-devel] [PATCH 08/16] qdev: remove parse method for string properties X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We need the print method to put double quotes, but parsing is not special. Signed-off-by: Paolo Bonzini --- hw/qdev-properties.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 16f9b22..0a293af 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -510,16 +510,6 @@ PropertyInfo qdev_prop_hex64 = { /* --- string --- */ -static int parse_string(DeviceState *dev, Property *prop, const char *str) -{ - char **ptr = qdev_get_prop_ptr(dev, prop); - - if (*ptr) - g_free(*ptr); - *ptr = g_strdup(str); - return 0; -} - static void free_string(DeviceState *dev, Property *prop) { g_free(*(char **)qdev_get_prop_ptr(dev, prop)); @@ -581,7 +571,6 @@ PropertyInfo qdev_prop_string = { .name = "string", .type = PROP_TYPE_STRING, .size = sizeof(char*), - .parse = parse_string, .print = print_string, .free = free_string, .get = get_string,