Commit cf5a774
nbd-client: Exit with error code other than EXIT_FAILURE
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.
Signed-off-by: Lin Liu <[email protected]>1 parent 7a64238 commit cf5a774
3 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
| 204 | + | |
203 | 205 | | |
204 | | - | |
| 206 | + | |
205 | 207 | | |
206 | | - | |
| 208 | + | |
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| |||
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
| |||
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
235 | | - | |
236 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| |||
0 commit comments