From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDceS-0005oe-RM for qemu-devel@nongnu.org; Tue, 20 Jan 2015 12:31:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDceO-0003Fw-V1 for qemu-devel@nongnu.org; Tue, 20 Jan 2015 12:31:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDceO-0003Fm-Ni for qemu-devel@nongnu.org; Tue, 20 Jan 2015 12:31:36 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0KHVZ1p031349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 20 Jan 2015 12:31:36 -0500 From: Jeff Cody Date: Tue, 20 Jan 2015 12:31:27 -0500 Message-Id: Subject: [Qemu-devel] [PATCH v2 0/6] RESEND - Update filename string sizes in block layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, jsnow@redhat.com, stefanha@redhat.com [ Note, my prior email to qemu-devel bounced, because I mistyped an address. Resending ] The block layer uses a mixture of 'PATH_MAX' and '1024' string sizes for filenames (and backing filenames). This series consolidates all that usage to 'PATH_MAX'. Since most platforms (especially the most common platforms for QEMU) have a PATH_MAX larger than 1024 bytes, this series also changes stack allocations of PATH_MAX to be dynamically allocated. Note: checkpatch.pl complains about an extra space in a printf in patches 1 & 2. The lines complained about are in the diff context and not the actual changes, so I did not fix them up to satisfy checkpatch. Changes from v2: - Change stack allocations to dybnamic (Thanks Kevin) - Update qcow/qcow2 ti perform safety checks for platforms that have a PATH_MAX < 1024 (thanks John, Kevin). Jeff Cody (6): block: vmdk - make ret variable usage clear block: vmdk - move string allocations from stack to the heap block: qapi - move string allocation from stack to the heap block: move string allocation from stack to the heap block: mirror - change string allocation to 2-bytes block: update string sizes for filename,backing_file,exact_filename block.c | 11 ++++--- block/mirror.c | 3 +- block/qapi.c | 8 +++-- block/qcow.c | 2 +- block/qcow2.c | 3 +- block/vmdk.c | 76 ++++++++++++++++++++++++++++------------------- block/vvfat.c | 4 +-- include/block/block_int.h | 8 ++--- qemu-img.c | 4 +-- 9 files changed, 70 insertions(+), 49 deletions(-) -- 1.9.3