3 Commits

Author SHA1 Message Date
Michael Tokarev
6e0206c135 spelling fixes: eventhough, shoudl, asyncronous, maxium, implicity
These changes are carried in debian for a long time, some since 2016.
The last one (implicity) is new in 1.20.0.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-02-05 10:22:23 -08:00
zhenwei pi
6e2c677553 utils: use strtol instead of atoi
HEX format is friendly to iSCSI utils, for example:
./iscsi-inq -e 0x1 -c 0xb1 iscsi://...

atoi supports decimal only, this example does not work.
Use strtol(nptr, NULL, 0) to auto-detect format, then this works fine.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
2023-07-08 07:44:16 -07:00
zhenwei pi
fb9c3f93ed iscsi-pr: add persistent reservation tool
iscsi-pr uses libiscsi to connect target and issues PR command.
In most cases, iscsi-pr use the same parameters as sg_persist(from sg3-utils).

For example, use iscsi-pr to dump keys by command:
  ~# ./utils/iscsi-pr --read-keys iscsi://192.168.122.44/iqn.2003-01.org.linux-iscsi.bytedance.x8664:sn.a6b7bff3d509/0 -i iqn.2005-03.org.open-iscsi:12345678
  PR generation=0x20, 19 registered reservation keys follow:
    0xabcd1234
    0xabcd
    0xabcd
    0xabc

A few command is not implemented in this patch, add them if necessary
in future.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
2022-02-20 21:17:40 -08:00