From patchwork Fri Nov 2 15:54:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Arnold X-Patchwork-Id: 196583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E0BA32C008C for ; Sat, 3 Nov 2012 02:54:38 +1100 (EST) Received: from localhost ([::1]:45008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUJZt-0007tU-6O for incoming@patchwork.ozlabs.org; Fri, 02 Nov 2012 11:54:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUJZl-0007t1-SK for qemu-devel@nongnu.org; Fri, 02 Nov 2012 11:54:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TUJZk-0003Hz-Lk for qemu-devel@nongnu.org; Fri, 02 Nov 2012 11:54:29 -0400 Received: from novprvoes0310.provo.novell.com ([137.65.248.74]:40804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUJZk-0003Hq-Fw for qemu-devel@nongnu.org; Fri, 02 Nov 2012 11:54:28 -0400 Received: from INET-PRV-MTA by novprvoes0310.provo.novell.com with Novell_GroupWise; Fri, 02 Nov 2012 09:54:26 -0600 Message-Id: <5093985002000091000828A4@novprvoes0310.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 12.0.1 Date: Fri, 02 Nov 2012 09:54:24 -0600 From: "Charles Arnold" To: Mime-Version: 1.0 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 137.65.248.74 Cc: Kevin Wolf Subject: [Qemu-devel] [PATCH] block: vpc initialize the uuid footer field 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 block/vpc: Initialize the uuid field in the footer with a generated uuid. Signed-off-by: Charles Arnold diff --git a/block/vpc.c b/block/vpc.c index b6bf52f..f14c6ae 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -26,6 +26,9 @@ #include "block_int.h" #include "module.h" #include "migration.h" +#if defined(CONFIG_UUID) +#include +#endif /**************************************************************/ @@ -739,7 +742,9 @@ static int vpc_create(const char *filename, QEMUOptionParameter *options) footer->type = be32_to_cpu(disk_type); - /* TODO uuid is missing */ +#if defined(CONFIG_UUID) + uuid_generate(footer->uuid); +#endif footer->checksum = be32_to_cpu(vpc_checksum(buf, HEADER_SIZE));