Accepting request 1071819 from home:ngueorguiev:branches:Base:System

- Applied a patch (bsc#1209196)
  * s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch

OBS-URL: https://build.opensuse.org/request/show/1071819
OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=161
This commit is contained in:
Nikolay Gueorguiev 2023-03-14 15:59:31 +00:00 committed by Git OBS Bridge
parent 943f9cc9ee
commit bff974e0d7
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,64 @@
---
zconf/zcrypt/lszcrypt.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/zconf/zcrypt/lszcrypt.c
+++ b/zconf/zcrypt/lszcrypt.c
@@ -838,12 +838,12 @@ static void show_devices_all(void)
/*
* Show devices specified on commandline
*/
-static void show_devices_argv(char *argv[])
+static void show_devices_argv(int argc, char **argv)
{
+ int id, dom, argidx, devidx, n, dev_cnt, sub_cnt;
struct util_rec *rec = util_rec_new_wide("-");
- struct dirent **dev_vec, **subdev_vec;
char *ap, *grp_dev, *path, *card, *sub_dev;
- int id, dom, i, n, dev_cnt, sub_cnt;
+ struct dirent **dev_vec, **subdev_vec;
/* check if ap driver is available */
ap = util_path_sysfs("bus/ap");
@@ -855,10 +855,10 @@ static void show_devices_argv(char *argv
define_rec_verbose(rec);
util_rec_print_hdr(rec);
- for (i = 0; argv[i] != NULL; i++) {
+ for (argidx = 0; argidx < argc; argidx++) {
id = -1;
dom = -1;
- if (sscanf(argv[i], "%x.%x", &id, &dom) >= 1) {
+ if (sscanf(argv[argidx], "%x.%x", &id, &dom) >= 1) {
/* at least the id field was valid */
if (id >= 0 && dom >= 0) { /* single subdevice */
util_asprintf(&sub_dev, "%02x.%04x", id, dom);
@@ -874,7 +874,7 @@ static void show_devices_argv(char *argv
}
continue;
}
- if (sscanf(argv[i]+1, "%x", &dom) == 1) {
+ if (sscanf(argv[argidx] + 1, "%x", &dom) == 1) {
/* list specific domains of all adapters */
path = util_path_sysfs("devices/ap/");
dev_cnt = util_scandir(&dev_vec, alphasort, path,
@@ -882,9 +882,9 @@ static void show_devices_argv(char *argv
if (dev_cnt < 1)
errx(EXIT_FAILURE, "No crypto card devices found.");
free(path);
- for (i = 0; i < dev_cnt; i++) {
+ for (devidx = 0; devidx < dev_cnt; devidx++) {
path = util_path_sysfs("devices/ap/%s",
- dev_vec[i]->d_name);
+ dev_vec[devidx]->d_name);
sub_cnt = util_scandir(&subdev_vec, alphasort,
path,
"[0-9a-fA-F]+.%04x",
@@ -1008,6 +1008,6 @@ int main(int argc, char **argv)
if (optind == argc)
show_devices_all();
else
- show_devices_argv(&argv[optind]);
+ show_devices_argv((argc - optind), &argv[optind]);
return EXIT_SUCCESS;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 13 15:33:43 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
- Applied a patch (bsc#1209196)
* s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
-------------------------------------------------------------------
Wed Mar 8 09:38:46 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>

View File

@ -164,6 +164,8 @@ Patch923: s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.p
Patch924: s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch
Patch925: s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch
Patch926: s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch
# Bug 1209196
Patch927: s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
#
Patch999: s390-tools-sles15sp5-fix-chown-commands-syntax.patch