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>
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>
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>