qemu/include
Jeff Cody 9a29e18f7d block: update string sizes for filename,backing_file,exact_filename
The string field entries 'filename', 'backing_file', and
'exact_filename' in the BlockDriverState struct are defined as 1024
bytes.

However, many places that use these values accept a maximum of PATH_MAX
bytes, so we have a mixture of 1024 byte and PATH_MAX byte allocations.
This patch makes the BlockDriverStruct field string sizes match usage.

This patch also does a few fixes related to the size that needs to
happen now:

    * the block qapi driver is updated to use PATH_MAX bytes
    * the qcow and qcow2 drivers have an additional safety check
    * the block vvfat driver is updated to use PATH_MAX bytes
      for the size of backing_file, for systems where PATH_MAX is < 1024
      bytes.
    * qemu-img uses PATH_MAX rather than 1024.  These instances were not
      changed to be dynamically allocated, however, as the extra
      temporary 3K in stack usage for qemu-img does not seem worrisome.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-23 18:17:06 +01:00
..
block block: update string sizes for filename,backing_file,exact_filename 2015-01-23 18:17:06 +01:00
disas disas: Implement disassembly output for A64 2014-02-08 14:50:48 +00:00
exec cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined 2015-01-20 15:19:35 +00:00
fpu softfloat: add functions corresponding to IEEE-2008 min/maxNumMag 2014-10-14 13:28:51 +01:00
hw virtio-blk: Pass req to virtio_blk_handle_scsi_req 2015-01-23 18:17:05 +01:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration vmstate: type-check sub-arrays 2015-01-16 13:06:17 +05:30
monitor block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
net net: remove bootindex property from qdev to qom 2014-10-15 09:52:54 +02:00
qapi qemu-socket: Eliminate silly QERR_ macros 2014-09-26 13:37:06 -04:00
qemu cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors 2015-01-20 15:19:35 +00:00
qom qom: Add description field in ObjectProperty struct 2014-10-15 05:03:15 +02:00
sysemu kvm: extend kvm_irqchip_add_msi_route to work on s390 2015-01-12 10:14:04 +01:00
ui vnc: switch to QemuOpts, allow multiple servers 2015-01-22 11:18:46 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h tcg-sparc: Use ADDXC in addsub2_i64 2014-09-29 14:55:27 -04:00
glib-compat.h glib: add compatibility interface for g_strcmp0() 2014-10-16 23:02:31 +01:00
qemu-common.h qemu-common.h: optimise muldiv64 if int128 is available 2015-01-14 10:38:57 +01:00
qemu-io.h qemu-io: Fix warnings from static code analysis 2014-03-13 14:42:24 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00