summaryrefslogtreecommitdiff
path: root/src/bin/evas/evas_cserve2_shm.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-07-08 16:55:58 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-07-08 17:16:04 +0900
commitee037d358689c23127e5f90ecee685557521041b (patch)
treefb373bd03f904130ce48dea6b2e0ffb1b12f0aaa /src/bin/evas/evas_cserve2_shm.c
parent9e459ef9d620532dd45e0cc07a53e7216df48690 (diff)
evas/cserve2: Add infix to shm filenames
Minor change So, we can distinguish between image, font and index shm files.
Diffstat (limited to 'src/bin/evas/evas_cserve2_shm.c')
-rw-r--r--src/bin/evas/evas_cserve2_shm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/evas/evas_cserve2_shm.c b/src/bin/evas/evas_cserve2_shm.c
index ffaa88917b..7dcf05dbb6 100644
--- a/src/bin/evas/evas_cserve2_shm.c
+++ b/src/bin/evas/evas_cserve2_shm.c
@@ -52,7 +52,7 @@ cserve2_shm_size_normalize(size_t size)
52} 52}
53 53
54Shm_Handle * 54Shm_Handle *
55cserve2_shm_request(size_t size) 55cserve2_shm_request(const char *infix, size_t size)
56{ 56{
57 Shm_Mapping *map; 57 Shm_Mapping *map;
58 Shm_Handle *shm; 58 Shm_Handle *shm;
@@ -76,7 +76,8 @@ cserve2_shm_request(size_t size)
76 } 76 }
77 77
78 do { 78 do {
79 snprintf(shmname, sizeof(shmname), "/evas-shm-img-%x-%d", (int)getuid(), id++); 79 snprintf(shmname, sizeof(shmname), "/evas-shm-%x-%s-%08x",
80 (int) getuid(), infix, id++);
80 fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); 81 fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
81 if (fd == -1 && errno != EEXIST) 82 if (fd == -1 && errno != EEXIST)
82 { 83 {
@@ -202,7 +203,7 @@ _cserve2_shm_cleanup()
202 const Eina_File_Direct_Info *f_info; 203 const Eina_File_Direct_Info *f_info;
203 char pattern[NAME_MAX]; 204 char pattern[NAME_MAX];
204 205
205 sprintf(pattern, "evas-shm-img-%x-", (int) getuid()); 206 sprintf(pattern, "evas-shm-%x-", (int) getuid());
206 iter = eina_file_direct_ls("/dev/shm"); 207 iter = eina_file_direct_ls("/dev/shm");
207 EINA_ITERATOR_FOREACH(iter, f_info) 208 EINA_ITERATOR_FOREACH(iter, f_info)
208 { 209 {