Lines Matching refs:lf
255 struct lockfs lf; in printstatus() local
267 bzero((caddr_t)&lf, sizeof (struct lockfs)); in printstatus()
269 lf.lf_flags = LOCKFS_MOD; in printstatus()
270 lf.lf_comlen = LOCKFS_MAXCOMMENTLEN; in printstatus()
271 lf.lf_comment = commentbuffer; in printstatus()
273 if (ioctl(fd, _FIOLFSS, &lf) == -1) { in printstatus()
279 switch (lf.lf_lock) { in printstatus()
283 if (LOCKFS_IS_BUSY(&lf)) in printstatus()
289 if (LOCKFS_IS_BUSY(&lf)) in printstatus()
293 fsmod = LOCKFS_IS_MOD(&lf); in printstatus()
297 if (LOCKFS_IS_BUSY(&lf)) in printstatus()
304 if (LOCKFS_IS_BUSY(&lf)) in printstatus()
310 if (LOCKFS_IS_BUSY(&lf)) in printstatus()
314 fsmod = LOCKFS_IS_MOD(&lf); in printstatus()
318 if (LOCKFS_IS_BUSY(&lf)) in printstatus()
322 fsmod = LOCKFS_IS_MOD(&lf); in printstatus()
326 if (LOCKFS_IS_BUSY(&lf)) in printstatus()
332 lf.lf_comment[lf.lf_comlen] = '\0'; in printstatus()
333 printstatusline(fn, locktype, lf.lf_comment); in printstatus()
371 struct lockfs lf; in lockfs() local
380 bzero((caddr_t)&lf, sizeof (struct lockfs)); in lockfs()
382 lf.lf_flags = LOCKFS_MOD; in lockfs()
383 if (ioctl(fd, _FIOLFSS, &lf) == -1) { in lockfs()
390 if (!LOCKFS_IS_BUSY(&lf) && LOCKFS_IS_MOD(&lf)) { in lockfs()
391 if (LOCKFS_IS_HLOCK(&lf)) in lockfs()
393 if (LOCKFS_IS_ELOCK(&lf)) in lockfs()
395 if (LOCKFS_IS_WLOCK(&lf)) in lockfs()
399 lf.lf_lock = lock; in lockfs()
400 lf.lf_flags = 0; in lockfs()
401 lf.lf_key = lf.lf_key; in lockfs()
402 lf.lf_comment = comment; in lockfs()
403 lf.lf_comlen = (comment) ? strlen(comment)+1 : 0; in lockfs()
405 if (ioctl(fd, _FIOLFS, &lf) == -1) { in lockfs()