diff mbox

dmraid/lib/activate activate.c

Message ID 20091207160547.31665.qmail@sourceware.org (mailing list archive)
State New, archived
Headers show

Commit Message

heinzm@sourceware.org Dec. 7, 2009, 4:05 p.m. UTC
None
diff mbox

Patch

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