Date: Thu, 27 Jun 2024 15:31:16 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 48d60dd3ac32 - stable/14 - padlock: Use device_set_descf() Message-ID: <202406271531.45RFVGCf079093@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48d60dd3ac325b61bf7d07c024ce83b84da97e14 commit 48d60dd3ac325b61bf7d07c024ce83b84da97e14 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-06-05 19:33:59 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-27 15:27:41 +0000 padlock: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 131c8ee7331af701c78e694c9c7051f53600c4fe) --- sys/crypto/via/padlock.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/crypto/via/padlock.c b/sys/crypto/via/padlock.c index b8dae256dbf4..2acdefd75bc6 100644 --- a/sys/crypto/via/padlock.c +++ b/sys/crypto/via/padlock.c @@ -80,31 +80,14 @@ padlock_identify(driver_t *drv, device_t parent) static int padlock_probe(device_t dev) { - char capp[256]; - #if defined(__amd64__) || defined(__i386__) /* If there is no AES support, we has nothing to do here. */ if (!(via_feature_xcrypt & VIA_HAS_AES)) { device_printf(dev, "No ACE support.\n"); return (EINVAL); } - strlcpy(capp, "AES-CBC", sizeof(capp)); -#if 0 - strlcat(capp, ",AES-EBC", sizeof(capp)); - strlcat(capp, ",AES-CFB", sizeof(capp)); - strlcat(capp, ",AES-OFB", sizeof(capp)); -#endif - if (via_feature_xcrypt & VIA_HAS_SHA) { - strlcat(capp, ",SHA1", sizeof(capp)); - strlcat(capp, ",SHA256", sizeof(capp)); - } -#if 0 - if (via_feature_xcrypt & VIA_HAS_AESCTR) - strlcat(capp, ",AES-CTR", sizeof(capp)); - if (via_feature_xcrypt & VIA_HAS_MM) - strlcat(capp, ",RSA", sizeof(capp)); -#endif - device_set_desc_copy(dev, capp); + device_set_descf(dev, "AES-CBC%s", + (via_feature_xcrypt & VIA_HAS_SHA) ? ",SHA1,SHA256" : ""); return (0); #else return (EINVAL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406271531.45RFVGCf079093>