From patchwork Sat Feb 12 22:44:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 82954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 53533B711D for ; Sun, 13 Feb 2011 10:20:41 +1100 (EST) Received: from localhost ([127.0.0.1]:40223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoOPH-00055V-1w for incoming@patchwork.ozlabs.org; Sat, 12 Feb 2011 17:57:35 -0500 Received: from [140.186.70.92] (port=38834 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoOD9-00085o-Is for qemu-devel@nongnu.org; Sat, 12 Feb 2011 17:45:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PoOD6-0000VL-5E for qemu-devel@nongnu.org; Sat, 12 Feb 2011 17:45:01 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:50340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PoOD6-0000Rm-0p for qemu-devel@nongnu.org; Sat, 12 Feb 2011 17:45:00 -0500 Received: by mail-vw0-f45.google.com with SMTP id 12so2378214vws.4 for ; Sat, 12 Feb 2011 14:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=ywnA+pqzWlVOOPAvo5fcaslnkyshKLGPLxm/X/89kQo=; b=GrKqzwyk41elmDTqniNzYyVpVkGHUb7uUUPXGGmluZxe15E+hmd2YzTKabeeZ8UowF WjcIebxpHvp06nnnn32n32RgcA0T2OXneH8H7XC5VmInMFTzZkmLJ4Gr+NKy/U4FNYXK 7O1wXzbd75aaVmt5Ri22LQxD8HZNmjwPDwmVM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=ungJJK3akvbdjzZBWnDWg2KZoAQTE3pzVHHwGbuGrNmOE2XUx2wfMNabXik1Qy+KFH NCVoyJcEbKOpbNL1E13EUO4eRzBKMd64GUG7J+XnvqSmOLuWO8gEPKErKHGnYiqVvcOL rnHWVtW1iSP9QrjgRqYrGAAIjHn63FIwbUdJg= Received: by 10.220.180.66 with SMTP id bt2mr2704289vcb.134.1297550699790; Sat, 12 Feb 2011 14:44:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.186.7 with HTTP; Sat, 12 Feb 2011 14:44:39 -0800 (PST) From: Blue Swirl Date: Sun, 13 Feb 2011 00:44:39 +0200 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.45 Subject: [Qemu-devel] [PATCH 10/10] fdc: make optional X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Ignore failure with fdc device creation. Signed-off-by: Blue Swirl --- hw/fdc.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/fdc.h b/hw/fdc.h index 3b2fb3b..09f73c6 100644 --- a/hw/fdc.h +++ b/hw/fdc.h @@ -11,7 +11,10 @@ static inline void fdctrl_init_isa(DriveInfo **fds) { ISADevice *dev; - dev = isa_create("isa-fdc"); + dev = isa_try_create("isa-fdc"); + if (!dev) { + return; + } if (fds[0]) { qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv); }