nbd icon indicating copy to clipboard operation
nbd copied to clipboard

nbd-client: Exit with error code other than EXIT_FAILURE

Open liulinC opened this issue 1 year ago • 0 comments

When nbd-client tries to connect to nbd device, it talks to kernel via netlink. If the nbd device is taken and locked by other process like systemd-udevd, kernel will return EBUSY to nbd client. However, nbd client just hide this error code with error message to check dmesg logs.

Checking the dmesg logs is error-prone and not friendly for other caller program. Instead, nbd-client should return the error code to the caller to handle it properly.

liulinC avatar Sep 29 '24 02:09 liulinC