mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
lszcrypt: Change exit code to 0 for empty device list
An empty device list is not an error case, if `lszcrypt` is called without a specific device list or device filter. Return with rc == 0 in such cases. Remove the message about the empty device list on stderr. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Holger Dengler <dengler@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
69c89416b0
commit
1afa6efb26
@@ -955,8 +955,6 @@ static void show_devices_all(void)
|
||||
/* Scan the devices */
|
||||
path = util_path_sysfs("devices/ap/");
|
||||
count = util_scandir(&dev_vec, alphasort, path, "card[0-9a-fA-F]+");
|
||||
if (count < 1)
|
||||
errx(EXIT_FAILURE, "No crypto card devices found.");
|
||||
util_rec_print_hdr(rec);
|
||||
for (i = 0; i < count; i++)
|
||||
show_device(rec, dev_vec[i]->d_name);
|
||||
|
||||
Reference in New Issue
Block a user