hvcsd->p_partition_ID  = pi->partition_ID;
 
        /* copy the null-term char too */
-       strlcpy(hvcsd->p_location_code, pi->location_code,
+       strscpy(hvcsd->p_location_code, pi->location_code,
                sizeof(hvcsd->p_location_code));
 }
 
 
        if (*s)
                earlycon->index = simple_strtoul(s, NULL, 10);
        len = s - name;
-       strlcpy(earlycon->name, name, min(len + 1, sizeof(earlycon->name)));
+       strscpy(earlycon->name, name, min(len + 1, sizeof(earlycon->name)));
        earlycon->data = &early_console_dev;
 }
 
                device->baud = simple_strtoul(options, NULL, 0);
                length = min(strcspn(options, " ") + 1,
                             (size_t)(sizeof(device->options)));
-               strlcpy(device->options, options, length);
+               strscpy(device->options, options, length);
        }
 
        return 0;
 
        if (options) {
                early_console_dev.baud = simple_strtoul(options, NULL, 0);
-               strlcpy(early_console_dev.options, options,
+               strscpy(early_console_dev.options, options,
                        sizeof(early_console_dev.options));
        }
        earlycon_init(&early_console_dev, match->name);
 
                         "MMIO 0x%llx", (unsigned long long)port->mapbase);
                break;
        default:
-               strlcpy(address, "*unknown*", sizeof(address));
+               strscpy(address, "*unknown*", sizeof(address));
                break;
        }
 
 
        serio->id.type = SERIO_RS232;
        if (up->su_type == SU_PORT_KBD) {
                serio->id.proto = SERIO_SUNKBD;
-               strlcpy(serio->name, "sukbd", sizeof(serio->name));
+               strscpy(serio->name, "sukbd", sizeof(serio->name));
        } else {
                serio->id.proto = SERIO_SUN;
                serio->id.extra = 1;
-               strlcpy(serio->name, "sums", sizeof(serio->name));
+               strscpy(serio->name, "sums", sizeof(serio->name));
        }
-       strlcpy(serio->phys,
+       strscpy(serio->phys,
                (!(up->port.line & 1) ? "su/serio0" : "su/serio1"),
                sizeof(serio->phys));
 
 
        serio->id.type = SERIO_RS232;
        if (up->flags & SUNZILOG_FLAG_CONS_KEYB) {
                serio->id.proto = SERIO_SUNKBD;
-               strlcpy(serio->name, "zskbd", sizeof(serio->name));
+               strscpy(serio->name, "zskbd", sizeof(serio->name));
        } else {
                serio->id.proto = SERIO_SUN;
                serio->id.extra = 1;
-               strlcpy(serio->name, "zsms", sizeof(serio->name));
+               strscpy(serio->name, "zsms", sizeof(serio->name));
        }
-       strlcpy(serio->phys,
+       strscpy(serio->phys,
                ((up->flags & SUNZILOG_FLAG_CONS_KEYB) ?
                 "zs/serio0" : "zs/serio1"),
                sizeof(serio->phys));