Lines Matching refs:name

18  * information: Portions Copyright [yyyy] [name of copyright owner]
50 * make a lock file with given 'name'
55 * name - name of the lock file to make
63 mklock(name)
64 register char *name;
80 cp = rindex(name, '/');
85 if (onelock(pid, tempfile, name) == -1) {
87 if (cklock(name))
90 if (onelock(pid, tempfile, name)) {
98 stlock(name);
111 cklock(name)
112 register char *name;
119 fd = open(name, O_RDONLY);
120 DEBUG(4, "ulockf name %s\n", name);
142 DEBUG(4, "--ok to remove lock file (%s)\n", name);
146 if (unlink(name) != 0) {
158 * put name in list of lock files
163 stlock(name)
164 char *name;
176 p = (char*) calloc((unsigned) strlen(name) + 1, sizeof (char));
177 ASSERT(p != NULL, "CAN NOT ALLOCATE FOR", name, 0);
178 (void) strcpy(p, name);
190 rmlock(name)
191 register char *name;
197 cp = rindex(name, '/');
207 if (name == NULL || EQUALS(name, Lockfile[i])) {
222 * pre - Path and first part of file name of the lock file to be
224 * s - The suffix part of the lock file. The name of the lock file
248 * pre - Path and first part of file name of the lock file to be
250 * name - The suffix part of the lock file. The name of the lock file
251 * will be derrived by concatenating pre, a period, and name.
258 umlock(pre, name)
260 char *name;
265 * if name has a '/' in it, then it's a device name and it's
279 if ( strchr(name, '/') != NULL )
281 (void) sprintf(lname, "%s.%s", pre, BASENAME(name, '/'));
290 * tempfile - name of a temporary in the same file system
291 * name - lock file name (full path name)
297 onelock(pid,tempfile,name)
299 char *tempfile, *name;
306 (void) sprintf(cb, "%s %s %d",tempfile, name, errno);
314 (void) sprintf(cb, "%s %s %d",tempfile, name, errno);
322 if(link(tempfile,name)<0){
325 DEBUG(4, "%s)\n", name);
378 * fn_cklock(name) - determine if the device indicated by name is locked
381 * SUCCESS - the name is not locked
382 * FAIL - the name is locked by another process
386 fn_cklock(name)
387 char *name;
389 /* we temporarily use lockname to hold full path name */
390 (void) sprintf(lockname, "%s%s", (*name == '/' ? "" : "/dev/"), name);