Lines Matching defs:name

18  * information: Portions Copyright [yyyy] [name of copyright owner]
49 * make a lock file with given 'name'
54 * name - name of the lock file to make
62 mklock(name)
63 register char *name;
79 cp = rindex(name, '/');
84 if (onelock(pid, tempfile, name) == -1) {
86 if (cklock(name))
89 if (onelock(pid, tempfile, name)) {
97 stlock(name);
110 cklock(name)
111 register char *name;
118 fd = open(name, O_RDONLY);
119 DEBUG(4, "ulockf name %s\n", name);
141 DEBUG(4, "--ok to remove lock file (%s)\n", name);
145 if (unlink(name) != 0) {
157 * put name in list of lock files
162 stlock(name)
163 char *name;
175 p = (char*) calloc((unsigned) strlen(name) + 1, sizeof (char));
176 ASSERT(p != NULL, "CAN NOT ALLOCATE FOR", name, 0);
177 (void) strcpy(p, name);
189 rmlock(name)
190 register char *name;
196 cp = rindex(name, '/');
206 if (name == NULL || EQUALS(name, Lockfile[i])) {
221 * pre - Path and first part of file name of the lock file to be
223 * s - The suffix part of the lock file. The name of the lock file
247 * pre - Path and first part of file name of the lock file to be
249 * name - The suffix part of the lock file. The name of the lock file
250 * will be derrived by concatenating pre, a period, and name.
257 mlock(pre, name)
259 char *name;
264 * if name has a '/' in it, then it's a device name and it's
278 if ( strchr(name, '/') != NULL )
280 (void) sprintf(lname, "%s.%s", pre, BASENAME(name, '/'));
289 * tempfile - name of a temporary in the same file system
290 * name - lock file name (full path name)
296 onelock(pid,tempfile,name)
298 char *tempfile, *name;
305 (void) sprintf(cb, "%s %s %d",tempfile, name, errno);
313 (void) sprintf(cb, "%s %s %d",tempfile, name, errno);
321 if(link(tempfile,name)<0){
324 DEBUG(4, "%s)\n", name);
377 * fn_cklock(name) - determine if the device indicated by name is locked
380 * SUCCESS - the name is not locked
381 * FAIL - the name is locked by another process
385 fn_cklock(name)
386 char *name;
388 /* we temporarily use lockname to hold full path name */
389 (void) sprintf(lockname, "%s%s", (*name == '/' ? "" : "/dev/"), name);