From patchwork Wed Aug 11 23:05:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bmarzins@sourceware.org X-Patchwork-Id: 118915 Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7BN8SEP018250 for ; Wed, 11 Aug 2010 23:09:04 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7BN6723000826; Wed, 11 Aug 2010 19:06:08 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7BN65GR006617 for ; Wed, 11 Aug 2010 19:06:05 -0400 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.8]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7BN60LV008086 for ; Wed, 11 Aug 2010 19:06:00 -0400 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id o7BN5os5026006 for ; Wed, 11 Aug 2010 19:05:51 -0400 Received: (qmail 32656 invoked by uid 9475); 11 Aug 2010 23:05:50 -0000 Date: 11 Aug 2010 23:05:50 -0000 Message-ID: <20100811230550.32654.qmail@sourceware.org> From: bmarzins@sourceware.org To: dm-cvs@sourceware.org, dm-devel@redhat.com X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.8 X-loop: dm-devel@redhat.com Subject: [dm-devel] multipath-tools/libmultipath discovery.c X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 11 Aug 2010 23:09:04 +0000 (UTC) --- multipath-tools/libmultipath/discovery.c 2010/06/23 16:28:07 1.32.2.14 +++ multipath-tools/libmultipath/discovery.c 2010/08/11 23:05:50 1.32.2.15 @@ -481,6 +481,7 @@ char attr_path[FILE_NAME_SIZE]; char attr_buff[FILE_NAME_SIZE]; unsigned int unused; + char vdisk; pp->bus = SYSFS_BUS_UNDEF; @@ -489,6 +490,12 @@ strcpy(pp->product_id, "GNBD"); pp->hwe = find_hwe(conf->hwtable, pp->vendor_id, pp->product_id); return 0; + } else if (sscanf(pp->dev, "vd%c", &vdisk) == 1 && + 'a' <= vdisk && vdisk <= 'z'){ + strcpy(pp->vendor_id, "VIRTIO"); + strcpy(pp->product_id, "VIRTIO"); + pp->hwe = find_hwe(conf->hwtable, pp->vendor_id, pp->product_id); + return 0; } /* * This is ugly : we should be able to do a simple