[Tizen-submit] 3412: Changes to Tizen:2.1:Main/dynamic-analysis-manager

noreply at tizen.org noreply at tizen.org
Fri Apr 26 15:07:55 GMT 2013


Hi,
Jinkun Jang have made the following changes to dynamic-analysis-manager in project Tizen:2.1:Main. Please review and accept ASAP.

Thank You,

[This message was auto-generated]

---

Request: #3412

  submit:       Tizen:2.1:Main:build/dynamic-analysis-manager(cleanup) -> Tizen:2.1:Main


Message:
Submitter: Jinkun Jang <jinkun.jang at samsung.com>
Comments: remove unnecessary packages
Git project: sdk/dynamic-analyzer/dynamic-analysis-manager
Tag: submit/tizen_2.1/20130426.150818
Commit: 4118662 apply hw acceleration property

State:   new        2013-04-26T07:38:32 tizenrobot
Comment: <no comment>
spec files:
-----------
--- dynamic-analysis-manager.spec
+++ dynamic-analysis-manager.spec
@@ -2,7 +2,7 @@
 Summary:    dynamic analyzer manager
 Version:    2.1.2
 Release:    1
-VCS:        sdk/dynamic-analyzer/dynamic-analysis-manager#2.1_release-0-g8056791
+VCS:        sdk/dynamic-analyzer/dynamic-analysis-manager#submit/tizen_2.1/20130426.150818-0-g4118662
 Group:      System/Libraries
 License:	Apache License, Version 2
 Source:    %{name}_%{version}.tar.gz

other changes:
--------------

++++++ dynamic-analysis-manager_2.1.2.tar.gz
--- /daemon/utils.c
+++ /daemon/utils.c
@@ -49,9 +49,7 @@
 #define SELF_LABEL_FILE		"/proc/self/attr/current"
 #define SMACK_LABEL_LEN		255
 #define SID_APP				5000
-
-#define APPDIR1				"/opt/apps/"
-#define APPDIR2				"/opt/usr/apps/"
+#define MANIFEST_PATH		"/info/manifest.xml"
 
 uint64_t str_to_uint64(char* str)
 {
@@ -254,12 +252,38 @@
 	return pos;
 }
 
+// return 0 to normal case
+// return non-zero to error case
+int get_manifest_path(const char* exec_path, char* buf, int buflen)
+{
+	char* chr;
+
+	strcpy(buf, exec_path);
+
+	chr = strrchr(buf, '/');
+	if(chr == NULL)
+		return -1;
+
+	*chr = '\0';
+
+	chr = strrchr(buf, '/');
+	if(chr == NULL)
+		return -1;
+
+	*chr = '\0';
+
+	strcat(buf, MANIFEST_PATH);
+	return 0;
+}
+
 // execute applcation with executable binary path
 // return 0 to fail to execute
 // return 1 to succeed to execute
 int exec_app(const char* exec_path, int app_type)
 {
 	pid_t   pid;
+	int isHwAcc = 0;
+	char manifest[PATH_MAX];
 	char command[PATH_MAX];
 	char appid[SMACK_LABEL_LEN];
 
@@ -275,6 +299,27 @@
     else if(pid > 0)
     	return 1;		// exit parent process with successness
 
+	if(get_manifest_path(exec_path, manifest, PATH_MAX) == 0)
+	{
+		FILE* fp;
+		char buffer[BUFFER_MAX];
+		char* res;
+
+		// grep for manifest
+		sprintf(command, "grep \"HwAcceleration=\\\"On\\\"\" %s", manifest);
+		fp = popen(command, "r");
+		if(fp != NULL)
+		{
+			buffer[0] = '\0';

Please refer to OBS webUI for more details about this SR.


More information about the Tizen-submit mailing list