ia64/xen-unstable

changeset 17391:633099ff88a8

tools: Use PATH_MAX for pathname char arrays.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Apr 04 14:49:37 2008 +0100 (2008-04-04)
parents 85d8d3f5c651
children 80f3c86feb7f
files tools/blktap/drivers/block-qcow.c tools/ioemu/block.c tools/ioemu/qemu-img.c
line diff
     1.1 --- a/tools/blktap/drivers/block-qcow.c	Fri Apr 04 13:54:05 2008 +0100
     1.2 +++ b/tools/blktap/drivers/block-qcow.c	Fri Apr 04 14:49:37 2008 +0100
     1.3 @@ -1112,7 +1112,7 @@ int qcow_create(const char *filename, ui
     1.4  	int shift, length, adjust, flags = 0, ret = 0;
     1.5  	QCowHeader header;
     1.6  	QCowHeader_ext exthdr;
     1.7 -	char backing_filename[1024], *ptr;
     1.8 +	char backing_filename[PATH_MAX], *ptr;
     1.9  	uint64_t tmp, size, total_length;
    1.10  	struct stat st;
    1.11  
     2.1 --- a/tools/ioemu/block.c	Fri Apr 04 13:54:05 2008 +0100
     2.2 +++ b/tools/ioemu/block.c	Fri Apr 04 14:49:37 2008 +0100
     2.3 @@ -347,8 +347,8 @@ int bdrv_open2(BlockDriverState *bs, con
     2.4                 BlockDriver *drv)
     2.5  {
     2.6      int ret, open_flags;
     2.7 -    char tmp_filename[1024];
     2.8 -    char backing_filename[1024];
     2.9 +    char tmp_filename[PATH_MAX];
    2.10 +    char backing_filename[PATH_MAX];
    2.11      
    2.12      bs->read_only = 0;
    2.13      bs->is_temporary = 0;
     3.1 --- a/tools/ioemu/qemu-img.c	Fri Apr 04 13:54:05 2008 +0100
     3.2 +++ b/tools/ioemu/qemu-img.c	Fri Apr 04 14:49:37 2008 +0100
     3.3 @@ -594,8 +594,8 @@ static int img_info(int argc, char **arg
     3.4      BlockDriverState *bs;
     3.5      char fmt_name[128], size_buf[128], dsize_buf[128];
     3.6      int64_t total_sectors, allocated_size;
     3.7 -    char backing_filename[1024];
     3.8 -    char backing_filename2[1024];
     3.9 +    char backing_filename[PATH_MAX];
    3.10 +    char backing_filename2[PATH_MAX];
    3.11      BlockDriverInfo bdi;
    3.12  
    3.13      fmt = NULL;