]> git.baikalelectronics.ru Git - kernel.git/commit
s390/protvirt: use scnprintf() instead of snprintf()
authorChen Zhou <chenzhou10@huawei.com>
Sat, 9 May 2020 08:56:08 +0000 (16:56 +0800)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 16 Jun 2020 11:44:05 +0000 (13:44 +0200)
commita628f20184fc979989a6e7af8c268226a85fb51a
tree73724f1db7cd634d4d946eb44cdd5dcccca7c682
parentf3cae4bb7a204138c9af6278ebda8cab0a8bf54a
s390/protvirt: use scnprintf() instead of snprintf()

snprintf() returns the number of bytes that would be written,
which may be greater than the the actual length to be written.

uv_query_facilities() should return the number of bytes printed
into the buffer. This is the return value of scnprintf().
The other functions are the same.

Link: https://lkml.kernel.org/r/20200509085608.41061-4-chenzhou10@huawei.com
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/uv.c