lockdev/lockdev.8
2010-01-21 11:53:07 +00:00

46 lines
1.2 KiB
Groff

.\"
.TH LOCKDEV 8 "SEPTEMBER 2009" "" ""
.\"
.\" Man page written by Jiri Popelka <jpopelka AT redhat DOT com>
.\"
.SH NAME
\fBLockdev\fR is a setgid binary,
which provides a reliable way to put an exclusive lock
in /var/lock to devices (e.g. ttyS0) using both FSSTND and SVr4 methods,
so regular users don't need write access there.
This task is achieved through calls to the liblockdev(3) API.
.SH SYNOPSIS
.B /usr/sbin/lockdev
.RB [< operation >]
.RB < device >
.SH DESCRIPTION
The \fBlockdev\fR command can perform one of the following operations (calls to liblockdev(3) API):
\fB-l\fR - lock device with \fBdev_lock()\fR function
\fB-u\fR - unlock device with \fBdev_unlock()\fR function
\fBno operation\fR - test lock with \fBdev_testlock()\fR function
.SH RETURN VALUES
Value dev_lock dev_unlock dev_testlock
0 OK OK not locked
1 locked other locked other locked
2 EACCES
3 EROFS
4 EFAULT
5 EINVAL
6 ENAMETOOLONG
7 ENOENT
8 ENOTDIR
9 ENOMEM
10 ELOOP
11 EIO
255 error error error
.SH SEE ALSO
.BR lockdev (3).