Changeset 119 for trunk/mmap.c
- Timestamp:
- 2006-09-01T01:45:54+02:00 (7 years ago)
- File:
-
- 1 edited
-
trunk/mmap.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mmap.c
r83 r119 153 153 volatile void *romem; 154 154 char tmpname[sizeof(TMP_PATH) - 1 + 100]; 155 const char *errstr = NULL; 155 156 156 157 CHECK(shm = calloc(1, sizeof(xc_shm_t)), "shm OOM"); … … 178 179 /* do not create file in /dev */ 179 180 if (strncmp(shm->name, "/dev", 4) == 0) { 181 perror(shm->name); 182 errstr = "Cannot open file set by xcache.mmap_path"; 180 183 goto err; 181 184 } … … 183 186 shm->newfile = 1; 184 187 if (fd == -1) { 188 perror(shm->name); 189 errstr = "Cannot open or create file set by xcache.mmap_path"; 185 190 goto err; 186 191 } … … 197 202 198 203 if (shm->ptr == XCACHE_MAP_FAILED) { 204 perror(shm->name); 205 errstr = "Failed creating file mappping"; 199 206 shm->ptr = NULL; 200 207 goto err; … … 268 275 xc_shm_destroy(shm); 269 276 } 277 if (errstr) { 278 fprintf(stderr, "%s\n", errstr); 279 zend_error(E_ERROR, "%s", errstr); 280 } 270 281 return NULL; 271 282 }
Note: See TracChangeset
for help on using the changeset viewer.

