Don't set the string "unknown" as a device's location_str
Return an empty string when the location is unknown instead of the string "unknown". This ensures that all location entries are of the form key=val. Suggested by: imp Approved by: jhb (mentor) MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D21326
This commit is contained in:
parent
93a0379392
commit
1974d7a40e
@ -866,7 +866,7 @@ acpi_child_location_str_method(device_t cbdev, device_t child, char *buf,
|
||||
strlcat(buf, buf2, buflen);
|
||||
}
|
||||
} else {
|
||||
snprintf(buf, buflen, "unknown");
|
||||
snprintf(buf, buflen, "");
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ nvdimm_root_child_location_str(device_t dev, device_t child, char *buf,
|
||||
if (handle != NULL)
|
||||
res = snprintf(buf, buflen, "handle=%s", acpi_name(handle));
|
||||
else
|
||||
res = snprintf(buf, buflen, "unknown");
|
||||
res = snprintf(buf, buflen, "");
|
||||
|
||||
if (res >= buflen)
|
||||
return (EOVERFLOW);
|
||||
|
Loading…
Reference in New Issue
Block a user