mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev: use consistent exit code for nonexistent device nodes
zdev's --by-node option returns exit code 15 (EXIT_RUNTIME_ERROR) when the specified device node cannot be found. This is inconsistent with other selection options --by-path and --by-interface which both return the more appropriate exit code 3 (EXIT_DEVICE_NOT_FOUND). Fix this by changing --by-node to also return exit code 3 in case the specified device node does not exist. Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
743788d02f
commit
42611a787d
@@ -603,7 +603,7 @@ exit_code_t select_by_node(struct select_opts *select,
|
||||
|
||||
devnode = devnode_from_node(path, err);
|
||||
if (!devnode)
|
||||
return EXIT_RUNTIME_ERROR;
|
||||
return EXIT_DEVICE_NOT_FOUND;
|
||||
|
||||
rc = select_by_devnode(select, selected, config, scope, only_dt,
|
||||
only_st, devnode, path, err);
|
||||
|
||||
Reference in New Issue
Block a user