File 0033-lio-utils-dont-dump-RO-attributes.patch of Package lio-utils.9620

diff -aurp lio-utils-4.1.orig/lio-py/lio_dump.py lio-utils-4.1/lio-py/lio_dump.py
--- lio-utils-4.1.orig/lio-py/lio_dump.py	2014-06-30 10:51:24.475925688 -0700
+++ lio-utils-4.1/lio-py/lio_dump.py	2014-06-30 10:53:18.195919922 -0700
@@ -136,12 +136,15 @@ def lio_target_configfs_dump(option, opt
 				print "echo " + value.rstrip() + " > " + attrib_file
 				os.close(p)
 	
-			# Dump values of iscsi/iqn/tpgt/attrib/
+			# Dump values of iscsi/iqn/tpgt/auth/
 			print "#### authentication for iSCSI Target Portal Group"
 			auth_dir = lio_root + "/" + iqn + "/tpgt_" + tpgt + "/auth/"
 			if os.path.isdir(auth_dir):
 				auth_root = os.listdir(auth_dir)
 				for auth in auth_root:
+					# authenticate_target is RO
+					if auth == "authenticate_target":
+						continue
 					auth_file = auth_dir + auth
 					p = os.open(auth_file, 0)
 					value = os.read(p, 256)
diff -aurp lio-utils-4.1.orig/tcm-py/tcm_dump.py lio-utils-4.1/tcm-py/tcm_dump.py
--- lio-utils-4.1.orig/tcm-py/tcm_dump.py	2014-06-30 10:51:24.503925686 -0700
+++ lio-utils-4.1/tcm-py/tcm_dump.py	2014-06-30 10:51:51.695924308 -0700
@@ -205,11 +205,7 @@ def tcm_dump_configfs(option, opt_str, v
 			dev_attrib_root = dev_root + g + "/attrib/"
 			for h in os.listdir(dev_attrib_root):
 				# The hw_* prefixed attributes are RO
-				if h == "hw_queue_depth":
-					continue
-				if h == "hw_max_sectors":
-					continue
-				if h == "hw_block_size":
+				if h.startswith("hw_"):
 					continue
 				# Do not change block-size for target_core_mod/pSCSI
 				if h == "block_size":
openSUSE Build Service is sponsored by