Changeset fde80323 in mainline


Ignore:
Timestamp:
2025-05-07T12:12:36Z (5 weeks ago)
Author:
Miroslav Cimerman <mc@…>
Children:
ed41962
Parents:
964e897
Message:

hrctl: correctly handle manualy specified devices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/hrctl/hrctl.c

    r964e897 rfde80323  
    108108        size_t i;
    109109
    110         for (i = 0; i < HR_MAX_EXTENTS; i++) {
     110        for (i = 0; i < HR_MAX_EXTENTS && optind < argc; i++) {
    111111                rc = loc_service_get_id(argv[optind], &cfg->devs[i], 0);
    112112                if (rc == ENOENT) {
     
    119119                        return EINVAL;
    120120                }
    121 
    122                 if (++optind >= argc)
    123                         break;
     121                optind++;
    124122        }
    125123
Note: See TracChangeset for help on using the changeset viewer.