mpc85xx: use strscpy instead of strlcpy
authorDavid Bauer <[email protected]>
Sat, 10 May 2025 09:00:57 +0000 (11:00 +0200)
committerDavid Bauer <[email protected]>
Wed, 12 Nov 2025 18:37:35 +0000 (19:37 +0100)
Usage of strlcpy results in a compilation error. strscpy is preferred
anyways and equivalent for our case.

Signed-off-by: David Bauer <[email protected]>
target/linux/mpc85xx/patches-6.12/102-powerpc-add-cmdline-override.patch

index 5014bf933ec4bb5852fcc497dcb58dfec0d67d1c..e7fb4bcd1b64c309497c0bd72691ada515b57203 100644 (file)
@@ -29,7 +29,7 @@
 +#ifdef CONFIG_CMDLINE_OVERRIDE
 +      p = of_get_flat_dt_prop(node, "bootargs-override", &l);
 +      if (p != NULL && l > 0)
-+              strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
++              strscpy(cmdline, p, COMMAND_LINE_SIZE);
 +#endif
 +
  handle_cmdline: