mirror of
https://xff.cz/git/u-boot/
synced 2025-09-29 22:41:17 +02:00
x86: Drop leading spaces in cpu_x86_get_desc()
The Intel CPU name can have leading spaces. Remove them since they are not useful. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -41,10 +41,14 @@ int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size)
|
|||||||
|
|
||||||
int cpu_x86_get_desc(struct udevice *dev, char *buf, int size)
|
int cpu_x86_get_desc(struct udevice *dev, char *buf, int size)
|
||||||
{
|
{
|
||||||
|
char *ptr;
|
||||||
|
|
||||||
if (size < CPU_MAX_NAME_LEN)
|
if (size < CPU_MAX_NAME_LEN)
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
|
|
||||||
cpu_get_name(buf);
|
ptr = cpu_get_name(buf);
|
||||||
|
if (ptr != buf)
|
||||||
|
strcpy(buf, ptr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user