This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/libdm libdm-deptree.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2010-05-25 08:40:37

Modified files:
	libdm          : libdm-deptree.c 

Log message:
	Fix copy&paste detection of kernel release version.
	Add log_error to avoid return_0 without log_error.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.81&r2=1.82

--- LVM2/libdm/libdm-deptree.c	2010/05/24 23:11:35	1.81
+++ LVM2/libdm/libdm-deptree.c	2010/05/25 08:40:36	1.82
@@ -1542,8 +1542,10 @@
 	const char *logtype;
 	unsigned kmaj, kmin, krel;
 
-	if (!uname(&uts) || sscanf(uts.release, "%u.%u.%u", &kmaj, &kmin, &krel) != 3)
-		return_0;
+	if (uname(&uts) == -1 || sscanf(uts.release, "%u.%u.%u", &kmaj, &kmin, &krel) != 3) {
+		log_error("Cannot read kernel release version");
+		return 0;
+	}
 
 	if ((seg->flags & DM_BLOCK_ON_ERROR)) {
 		/*


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]