mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
padlock: Use device_set_descf()
No functional change intended. MFC after: 1 week
This commit is contained in:
parent
89848b3445
commit
131c8ee733
|
@ -79,31 +79,14 @@ padlock_identify(driver_t *drv, device_t parent)
|
||||||
static int
|
static int
|
||||||
padlock_probe(device_t dev)
|
padlock_probe(device_t dev)
|
||||||
{
|
{
|
||||||
char capp[256];
|
|
||||||
|
|
||||||
#if defined(__amd64__) || defined(__i386__)
|
#if defined(__amd64__) || defined(__i386__)
|
||||||
/* If there is no AES support, we has nothing to do here. */
|
/* If there is no AES support, we has nothing to do here. */
|
||||||
if (!(via_feature_xcrypt & VIA_HAS_AES)) {
|
if (!(via_feature_xcrypt & VIA_HAS_AES)) {
|
||||||
device_printf(dev, "No ACE support.\n");
|
device_printf(dev, "No ACE support.\n");
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
}
|
}
|
||||||
strlcpy(capp, "AES-CBC", sizeof(capp));
|
device_set_descf(dev, "AES-CBC%s",
|
||||||
#if 0
|
(via_feature_xcrypt & VIA_HAS_SHA) ? ",SHA1,SHA256" : "");
|
||||||
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);
|
|
||||||
return (0);
|
return (0);
|
||||||
#else
|
#else
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
Loading…
Reference in a new issue