Lines Matching defs:filename

170 static pid_t filename_to_pid(const char* filename) {
172 // a filename that doesn't begin with a digit is not a
175 if (!isdigit(*filename)) {
184 pid_t pid = (pid_t)strtol(filename, &remainder, 10);
190 // check for left over characters. If any, then the filename is
366 char* filename = NEW_C_HEAP_ARRAY(char,
369 strcpy(filename, usrdir_name);
370 strcat(filename, "/");
371 strcat(filename, udentry->d_name);
374 RESTARTABLE(::lstat(filename, &statbuf), result);
376 FREE_C_HEAP_ARRAY(char, filename, mtInternal);
382 FREE_C_HEAP_ARRAY(char, filename, mtInternal);
386 // compare and save filename with latest creation time
400 FREE_C_HEAP_ARRAY(char, filename, mtInternal);
510 static void remove_file(const char* dirname, const char* filename) {
512 size_t nbytes = strlen(dirname) + strlen(filename) + 2;
517 strcat(path, filename);
644 static int create_sharedmem_resources(const char* dirname, const char* filename, size_t size) {
655 RESTARTABLE(::open(filename, O_RDWR|O_CREAT|O_TRUNC, S_IREAD|S_IWRITE), result);
658 warning("could not create file %s: %s\n", filename, strerror(errno));
683 static int open_sharedmem_file(const char* filename, int oflags, TRAPS) {
687 RESTARTABLE(::open(filename, oflags), result);
732 char* filename = get_sharedmem_filename(dirname, vmid);
740 fd = create_sharedmem_resources(dirname, filename, size);
746 FREE_C_HEAP_ARRAY(char, filename, mtInternal);
761 remove_file(filename);
762 FREE_C_HEAP_ARRAY(char, filename, mtInternal);
767 backing_store_file_name = filename;
896 char* filename = get_sharedmem_filename(dirname, vmid);
899 // method below need to use the filename, but could throw an
902 char* rfilename = NEW_RESOURCE_ARRAY(char, strlen(filename) + 1);
903 strcpy(rfilename, filename);
908 FREE_C_HEAP_ARRAY(char, filename, mtInternal);