lockdev(8) - Linux man page
Name
lockdev demonstrates functionality of liblockdev library.Synopsis
/usr/sbin/lockdev [<operation>] <device>Description
The lockdev command can perform one of the following operations:-l - lock device with dev_lock() function
-u - unlock device with dev_unlock() function
no operation - test lock with dev_testlock()
function
Return Values
Value dev_lock dev_unlock dev_testlock0 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