1LOCKDEV(8)                                                          LOCKDEV(8)
2
3
4

NAME

6       Lockdev  is  a  setgid  binary, which provides a reliable way to put an
7       exclusive lock in /var/lock to devices (e.g. ttyS0) using  both  FSSTND
8       and SVr4 methods, so regular users don't need write access there.
9
10       This task is achieved through calls to the liblockdev(3) API.
11
12

SYNOPSIS

14       /usr/sbin/lockdev [<operation>] <device>
15
16

DESCRIPTION

18       The  lockdev command can perform one of the following operations (calls
19       to liblockdev(3) API):
20
21       -l - lock device with dev_lock() function
22
23       -u - unlock device with dev_unlock() function
24
25       no operation - test lock with dev_testlock() function
26
27

RETURN VALUES

29          Value  dev_lock         dev_unlock       dev_testlock
30          0      OK               OK               not locked
31          1      locked other     locked other     locked
32          2      EACCES
33          3      EROFS
34          4      EFAULT
35          5      EINVAL
36          6      ENAMETOOLONG
37          7      ENOENT
38          8      ENOTDIR
39          9      ENOMEM
40         10      ELOOP
41         11      EIO
42        255      error               error               error
43
44

SEE ALSO

46       lockdev(3).
47
48
49
50                                SEPTEMBER 2009                      LOCKDEV(8)
Impressum