Remove libhw
The entries for libhw* are no longer needed in .gitignore.
There is also no longer a difference between common-obj-y andhw-obj-y, so one of those two macros is sufficient.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rtc: map CMOS index 0x37 to 0x32 on read and writes
QEMU's attempt to implement the century byte cover two possible placesfor the byte. A common one on modern chipsets is 0x32, but QEMU alsostores the value in 0x37 (apparently for IBM PS/2 compatibility---it's...
rtc: implement century byte
Implement the century byte in the RTC emulation, and test that it works.This leads to some annoying compatibility code because we need to treata value of 2000 for the base_year property as "use the century byteproperly" (which would be a value of 0)....
acpi: remove strzcpy (strncpy-identical) function; just use strncpy
Adjust all uses s/strzcpy/strncpy/ and mark these usesof strncpy as "ok".
Signed-off-by: Jim Meyering <meyering@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/r2d: add comment: this strncpy use is ok
hw/9pfs: avoid buffer overrun
v9fs_add_dir_node and qemu_v9fs_synth_add_file used strncpyto form node->name, which requires NUL-termination, butstrncpy does not ensure NUL-termination.Use pstrcpy, which does.
Acked-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>...
lm32: avoid buffer overrun
Actually do what the comment says, using pstrcpy NUL-terminate:strncpy does not always do that.
bt: replace fragile snprintf use and unwarranted strncpy
In bt_hci_name_req a failed snprintf could return len larger thansizeof(params.name), which means the following memset call wouldhave a "length" value of (size_t)-1, -2, etc... Sounds scary.But currently, one can deduce that there is no problem:...
virtio-9p: avoid unwarranted uses of strncpy
In all of these cases, the uses of strncpy were unnecessary, sinceat each point of use we know that the NUL-terminated source bytesfit in the destination buffer. Use memcpy in place of strncpy.
vscsi: avoid unwarranted strncpy
Don't use strncpy when the source string is known to fitin the destination buffer. Use equivalent memcpy.We could even use strcpy, here, but some static analyzerswarn about that, so don't add new uses.
Acked-by: David Gibson <david@gibson.dropbear.id.au>...
View revisions
Also available in: Atom