Statistics
| Branch: | Revision:

root / block / vvfat.c @ a77cffe7

History | View | Annotate | Download (80.6 kB)

# Date Author Comment
d523d5d6 10/03/2010 09:40 am Stefan Weil

block/vvfat: Fix compiler warning in debug code

Fix this compiler warning:
./block/vvfat.c:2285: error: comparison of unsigned expression >= 0 is always true

Cc: Blue Swirl <>
Cc: Kevin Wolf <>
Signed-off-by: Stefan Weil <>...

ac48e389 09/21/2010 04:39 pm Kevin Wolf

vvfat: Fix segfault on write to read-only disk

vvfat tries to set the readonly flag in its open function, but nowadays
this is overwritted with the readonly=... command line option. Check in
bdrv_write if the vvfat was opened read-only and return an error in this...

9217e26f 09/21/2010 04:39 pm Kevin Wolf

vvfat: Fix double free for opening the image rw

Allocation and deallocation of bs->opaque is not in the control of a
block driver. Therefore it should not set bs->opaque to a data structure
used by another bs, or closing the image will lead to a double free....

a655211a 09/21/2010 04:39 pm Kevin Wolf

vvfat: Use cache=unsafe

The qcow file used for write support in vvfat is a temporary file,
so we can use cache=unsafe there. Without this, write support is just
too slow to be of any use.

Signed-off-by: Kevin Wolf <>

2aa326be 08/30/2010 07:29 pm Loïc Minier

vvfat: fat_chksum(): fix access above array bounds

Signed-off-by: Loïc Minier <>
Signed-off-by: Kevin Wolf <>

792b45b1 05/21/2010 12:49 pm Riccardo Magliocchetti

vvfat: Fix compilation with DEBUG defined

gcc does not like passing a NULL where an int value is expected:

block/vvfat.c: In function ‘checkpoint’:
block/vvfat.c:2868: error: passing argument 2 of ‘remove_mapping’ makes
integer from pointer without a cast...

3e89cb04 05/21/2010 12:49 pm Kevin Wolf

vvfat: More build fixes with DEBUG

Casting a pointer to an int doesn't work on 64 bit platforms. Use the %p printf
conversion specifier instead.

Signed-off-by: Kevin Wolf <>

66f82cee 05/03/2010 11:07 am Kevin Wolf

block: Open the underlying image file in generic code

Format drivers shouldn't need to bother with things like file names, but rather
just get an open BlockDriverState for the underlying protocol. This patch
introduces this behaviour for bdrv_open implementation. For protocols which...

88bf7950 04/25/2010 06:27 pm Blue Swirl

Fix dead initialization, spotted by clang analyzer

Fix clang warnings:
/src/qemu/block/vvfat.c:1102:9: warning: Value stored to 'index3' during its initialization is never read
int index3=index1+1;
/src/qemu/cmd.c:290:15: warning: Value stored to 'p' during its initialization is never read...

d6e9098e 04/23/2010 05:08 pm Kevin Wolf

Replace calls of old bdrv_open

What is known today as bdrv_open2 becomes the new bdrv_open. All remaining
callers of the old function are converted to the new one. In some places they
even know the right format, so they should have used bdrv_open2 from the...

43dc2a64 03/18/2010 08:41 pm Blue Swirl

Replace assert(0) with abort() or cpu_abort()

When building with -DNDEBUG, assert(0) will not stop execution
so it must not be used for abnormal termination.

Use cpu_abort() when in CPU context, abort() otherwise.

Signed-off-by: Blue Swirl <>

a6c6f76c 03/13/2010 04:18 pm Blue Swirl

Fix build with -DNDEBUG in CFLAGS

Signed-off-by: Blue Swirl <>

6265eb26 02/10/2010 10:00 pm Jim Meyering

don't dereference NULL after failed strdup

Most of these are obvious NULL-deref bug fixes, for example,
the ones in these files:

block/curl.c
net.c
slirp/misc.c

and the first one in block/vvfat.c.
The others in block/vvfat.c may not lead to an immediate segfault, but I...

058fc8c7 01/26/2010 11:42 pm Naphtali Sprei

Ask for read-write permissions when opening files

Found some places that seems needs this explicitly, now that
read-write is not the default.

Signed-off-by: Naphtali Sprei <>
Signed-off-by: Anthony Liguori <>

2dedf83e 01/26/2010 10:59 pm Kirill A. Shutemov

block/vvfat.c: fix warnings with _FORTIFY_SOURCE

CC block/vvfat.o
cc1: warnings being treated as errors
block/vvfat.c: In function 'commit_one_file':
block/vvfat.c:2259: error: ignoring return value of 'ftruncate', declared with attribute warn_unused_result...

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

6ab00cee 09/30/2009 09:45 pm Michael S. Tsirkin

vvfat: fix coding style nit

Put space between = and & when taking a pointer,
to avoid confusion with old-style "&=".

Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Blue Swirl <>

f9e96436 05/28/2009 10:14 am Christoph Hellwig

vvfat: one more missing BlockDriver C99 initializer conversion

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Anthony Liguori <>

91a073a9 05/27/2009 05:45 pm Kevin Wolf

Drop bdrv_create2

This patch converts the remaining users of bdrv_create2 to bdrv_create and
removes the now unused function.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

0e7e1989 05/22/2009 06:50 pm Kevin Wolf

Convert all block drivers to new bdrv_create

Now we can make use of the newly introduced option structures. Instead of
having bdrv_create carry more and more parameters (which are format specific in
most cases), just pass a option structure as defined by the driver itself....

019d6b8f 05/15/2009 12:13 am Anthony Liguori

Move block drivers into their own directory

Signed-off-by: Anthony Liguori <>