Index: /branches/amp_3_7_1_15_serialnumber/lib/feactl/cm_ul.c
===================================================================
--- /branches/amp_3_7_1_15_serialnumber/lib/feactl/cm_ul.c	(revision 2777)
+++ /branches/amp_3_7_1_15_serialnumber/lib/feactl/cm_ul.c	(working copy)
@@ -25,7 +25,7 @@
 #include <sys/ioctl.h>	
 #include <sys/wait.h>
 #include <errno.h>
-
+#include <syslog.h>
 
 #include "cm_ul.h"
 #include "cm_feactl.h"
@@ -154,6 +154,7 @@
 	if ((stream = popen(GET_UUID_CMD, "r")) == NULL) {
 		//englog(ENGLOG_FEACTL, FEACTL_VAPV_ERR, "get uuid: popen error(%d, %s)\n",
 		//		errno, strerror(errno));
+		syslog(LOG_ERR, "get_smbios_system_uuid: failed to popen (%s)\n", strerror(errno));
 		return -1;
 	}
 
@@ -181,16 +182,20 @@
 		return -1;
 
 	stream = popen(GET_CONTAINER_UUID_v1, "r");
-	if (!stream)
+	if (!stream) {
+		syslog(LOG_ERR, "get_container_uuid: failed to get uuid v1 (%s)\n", strerror(errno));
 		return -1;
+	}
 
 	fgets(buffer, sizeof(buffer), stream);
 	pclose(stream);
 	
 	if (strlen(buffer) < 64) {
 		stream = popen(GET_CONTAINER_UUID_v2, "r");
-		if (!stream)
+		if (!stream) {
+			syslog(LOG_ERR, "get_container_uuid: failed to get uuid v2 (%s)\n", strerror(errno));
 			return -1;
+		}
 
 		memset(buffer, 0, sizeof(buffer));
 		fgets(buffer, sizeof(buffer), stream);
@@ -266,6 +271,7 @@
 		ret = get_container_uuid(tmp_buf, sizeof(uuid_buf));
 	}
 	if (ret == -1) {
+		syslog(LOG_ERR, "gen_machine_sign: failed to get uuid (%s)\n", strerror(errno));
 		return ret;
 	}
 
@@ -482,6 +488,7 @@
 	FILE *fd = NULL;
 	char sign[8] = {0};
 	char buf[512];
+	int ret = 0;
 
 	fd = fopen(ARRAYSN, "r");
 	if (fd) {
@@ -489,10 +496,16 @@
 		sn_old[SERNUMLEN-1] = '\0';
 		fclose( fd );
 	} else {
+		syslog(LOG_ERR, "check_machine_sign_validity: failed to fopen error(%d, %s)\n", errno, strerror(errno));
 		return -1;
 	}
 
-	gen_machine_sign(sign, sizeof(sign));
+	ret = gen_machine_sign(sign, sizeof(sign));
+	if (ret == -1) {
+		syslog(LOG_ERR, "check_machine_sign_validity: failed to get sign (%s)\n", strerror(errno));
+		return -1;
+	}
+	syslog(LOG_ERR, "check_machine_sign_validity: sign (%s)\n", sign);
 
 	if (strncmp(sn_old + ARRAYIDLEN + 10, sign, SERNUMLEN-ARRAYIDLEN-1-10) != 0) {
 		snprintf(buf, sizeof(buf), "rm -rf %s", ARRAYSN);
