From patchwork Mon Dec 7 16:05:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: heinzm@sourceware.org X-Patchwork-Id: 65537 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB7G62NM018965 for ; Mon, 7 Dec 2009 16:06:02 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id A4168619248; Mon, 7 Dec 2009 11:06:01 -0500 (EST) Received: from int-mx03.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id nB7G60le001598 for ; Mon, 7 Dec 2009 11:06:00 -0500 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.8]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB7G5xGQ027002 for ; Mon, 7 Dec 2009 11:05:59 -0500 Received: from sourceware.org (sourceware.org [209.132.176.174]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id nB7G5lUv022691 for ; Mon, 7 Dec 2009 11:05:48 -0500 Received: (qmail 31667 invoked by uid 9450); 7 Dec 2009 16:05:47 -0000 Date: 7 Dec 2009 16:05:47 -0000 Message-ID: <20091207160547.31665.qmail@sourceware.org> From: heinzm@sourceware.org To: dm-cvs@sourceware.org, dm-devel@redhat.com X-RedHat-Spam-Score: -3.911 (AWL,RCVD_IN_DNSWL_MED) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.8 X-loop: dm-devel@redhat.com Cc: Subject: [dm-devel] dmraid/lib/activate activate.c X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com --- dmraid/lib/activate/activate.c 2009/09/16 11:45:13 1.5 +++ dmraid/lib/activate/activate.c 2009/12/07 16:05:46 1.6 @@ -964,11 +964,13 @@ { int ret = 0; char *table = NULL; + struct dmraid_format *fmt = get_format(rs); if (T_GROUP(rs)) return 1; - if (what == DM_REGISTER) + if (what == DM_REGISTER && + fmt->metadata_handler) return register_devices(lc, rs); /* Call type handler */ @@ -1053,8 +1055,10 @@ enum dm_what what) { int ret = 1, status; + struct dmraid_format *fmt = get_format(rs); - if (what == DM_REGISTER) + if (what == DM_REGISTER && + fmt->metadata_handler) return unregister_devices(lc, rs); status = dm_status(lc, rs);