[Title]change name pid to port
authormunkyu.im <munkyu.im@samsung.com>
Wed, 14 Mar 2012 10:56:46 +0000 (19:56 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Wed, 14 Mar 2012 10:56:46 +0000 (19:56 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/emulator.c
tizen/src/process.c
tizen/src/process.h

index 51f34ef..920829b 100644 (file)
@@ -68,7 +68,7 @@ void exit_emulator(void)
     shutdown_skin_server();
     shutdown_guest_server();
     SDL_Quit();
-    remove_pidfile();
+    remove_portfile();
 }
 
 static void construct_main_window(int skin_argc, char* skin_argv[])
@@ -133,7 +133,7 @@ void get_image_path(int qemu_argc, char* qemu_argv)
     }
     path[j] = '\0';
 
-    write_pidfile(path);
+    write_portfile(path);
 }
 
 int qemu_main(int argc, char** argv, char** envp);
index 29ea76b..5556305 100644 (file)
@@ -42,7 +42,7 @@
 //DEFAULT_DEBUG_CHANNEL(tizen);
 MULTI_DEBUG_CHANNEL(tizen, process);
 
-static char pidfname[512] = { 0, };
+static char portfname[512] = { 0, };
 static char tizen_vms_path[512] = {0, };
 extern int tizen_base_port;
 #ifdef _WIN32
@@ -89,18 +89,18 @@ static char *mbstok_r (char *string, const char *delim, char **save_ptr)
 #endif
 
 /**
- * @brief      make pid directory
- * @param      pidfname : pid file name
+ * @brief      make port directory
+ * @param      portfname : port file name
  * @date    Nov 25. 2008
  * */ 
 
-static int make_pid_path(const char *pidfname)
+static int make_port_path(const char *portfname)
 {
        char dir[512] = "", buf[512] = "";
        char *ptr, *last = NULL, *lptr = NULL;
        int dirnamelen = 0;
 
-       sprintf(buf, "%s", pidfname);
+       sprintf(buf, "%s", portfname);
 #ifndef _WIN32 
        lptr = ptr = strtok_r(buf+1, "/", &last);
 #else
@@ -139,12 +139,12 @@ static int make_pid_path(const char *pidfname)
 
 
 /**
- * @brief      wirte pid file
+ * @brief      wirte port file
  * @param      mod: emulator, vinit
  * @date    Nov 25. 2008
  * */
 
-int write_pidfile(char *path)
+int write_portfile(char *path)
 {
        int             fd = -1;
        char    buf[128] = "";
@@ -154,17 +154,17 @@ int write_pidfile(char *path)
     else
         strcpy(tizen_vms_path, g_path_get_dirname(path));
 
-    sprintf(pidfname, "%s/.port", tizen_vms_path);
+    sprintf(portfname, "%s/.port", tizen_vms_path);
 
        if (access(tizen_vms_path, R_OK) != 0) {
-               make_pid_path(pidfname);
+               make_port_path(portfname);
        }
 #ifdef _WIN32
-       if ((fd = open(g_win32_locale_filename_from_utf8(pidfname), O_RDWR | O_CREAT, 0666)) < 0) {
+       if ((fd = open(g_win32_locale_filename_from_utf8(portfname), O_RDWR | O_CREAT, 0666)) < 0) {
 #else
-       if ((fd = open(pidfname, O_RDWR | O_CREAT, 0666)) < 0) {
+       if ((fd = open(portfname, O_RDWR | O_CREAT, 0666)) < 0) {
 #endif
-               ERR("Failed to create .pid file\n");
+               ERR("Failed to create .port file\n");
                ERR("%s at %s(%d)\n", strerror(errno), __FILE__, __LINE__);
            return -1;
        }
@@ -180,23 +180,23 @@ int write_pidfile(char *path)
 }
 
 /**
- * @brief      remove pid file
+ * @brief      remove port file
  * @param      mod: emulator, vinit
  * @date    Nov 25. 2008
  * */
 
-int remove_pidfile(void)
+int remove_portfile(void)
 {
-       if (strlen(pidfname) <= 0) {
+       if (strlen(portfname) <= 0) {
                return -1;
        }
 
 #ifdef _WIN32
-    if (remove(g_win32_locale_filename_from_utf8(pidfname)) < 0) {
+    if (remove(g_win32_locale_filename_from_utf8(portfname)) < 0) {
 #else
-       if (remove(pidfname) < 0) {
+       if (remove(portfname) < 0) {
 #endif
-               ERR( "Can't remove pid file. (%s)\n", pidfname);
+               ERR( "Can't remove port file. (%s)\n", portfname);
        }
 
        return 0;
index 8c201d1..59c972f 100644 (file)
@@ -48,8 +48,8 @@ extern "C" {
 #include <glib.h>
 #include <glib/gstdio.h>
 
-int write_pidfile(char *path);
-int remove_pidfile(void);
+int write_portfile(char *path);
+int remove_portfile(void);
 
 #ifdef _WIN32
 #include <windows.h>