17 lines · bash
1# SPDX-License-Identifier: GPL-2.02source ../port_scale.sh3 4port_get_target()5{6 local should_fail=$17 local target8 9 target=$(devlink_resource_size_get physical_ports)10 11 if ((! should_fail)); then12 echo $target13 else14 echo $((target + 1))15 fi16}17