The "magic" line here:
grep -o 'androidboot\.slot_suffix=..' /proc/cmdline | cut -d "=" -f2
Checks for the kernel cmdline argument
androidboot.slot_suffix and gets its value. This cmdline arg is required for all A/B devices . On non A/B devices it will be empty.
This will enable seamless kernel updates for the OnePlus 6, 6T and a lot of other modern devices (MSM8998+) devices with slots which are slowly starting to appear in pmaports.