Check if NBD_ATTR_BACKEND_IDENTIFIER is defined
parent
af9a853db6
commit
dff4879c8c
|
@ -161,12 +161,14 @@ static int netlink_configure(const int *sockfd, int sock_size, int dev_num, uint
|
||||||
NLA_PUT_U64(msg, NBD_ATTR_DEAD_CONN_TIMEOUT, conn_timeout);
|
NLA_PUT_U64(msg, NBD_ATTR_DEAD_CONN_TIMEOUT, conn_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NBD_ATTR_BACKEND_IDENTIFIER
|
||||||
if (backend)
|
if (backend)
|
||||||
{
|
{
|
||||||
// Backend is an attribute useful for identication of the device
|
// Backend is an attribute useful for identication of the device
|
||||||
// Also it prevents reconfiguration of the device with a different backend string
|
// Also it prevents reconfiguration of the device with a different backend string
|
||||||
NLA_PUT_STRING(msg, NBD_ATTR_BACKEND_IDENTIFIER, backend);
|
NLA_PUT_STRING(msg, NBD_ATTR_BACKEND_IDENTIFIER, backend);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
msg_attr = nla_nest_start(msg, NBD_ATTR_SOCKETS);
|
msg_attr = nla_nest_start(msg, NBD_ATTR_SOCKETS);
|
||||||
if (!msg_attr)
|
if (!msg_attr)
|
||||||
|
|
Loading…
Reference in New Issue