All of lore.kernel.org
 help / color / mirror / Atom feed
* dmraid/lib/activate activate.c
@ 2009-12-07 16:05 heinzm
  0 siblings, 0 replies; only message in thread
From: heinzm @ 2009-12-07 16:05 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	dmraid
Changes by:	heinzm@sourceware.org	2009-12-07 16:05:46

Modified files:
	lib/activate   : activate.c 

Log message:
	Avoid (un)registering devices for monitoring if metadata format handler doesn't support it

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/dmraid/lib/activate/activate.c.diff?cvsroot=dm&r1=1.5&r2=1.6

--- 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-07 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 16:05 dmraid/lib/activate activate.c heinzm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.