summaryrefslogtreecommitdiffstats
path: root/cmd.c
Commit message (Collapse)AuthorAgeFilesLines
* qemu-io: correctly print non-integer values as decimalsPaolo Bonzini2012-05-101-17/+23
| | | | | | | | | | | | | qemu-io's cvtstr function sometimes will incorrectly omit the decimal part of the number, and sometimes will incorrectly include it. This patch fixes both. The former is more serious, and can be seen in the patches to 027.out and 033.out. The changes to all other files were scripted with sed, so there were no "surprises" beyond 027.out and 033.out. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-io: use main_loop_waitPaolo Bonzini2012-04-191-5/+5
| | | | | | | | This will let timers run during aio_read and aio_write commands, though not during synchronous commands. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* cmd: Fix potential memory leakPavel Borzenkov2011-11-071-2/+7
| | | | | Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* cmd: Fix potential NULL pointer dereferencePavel Borzenkov2011-11-071-8/+3
| | | | | Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* cmd: Fix coding style in cmd.cPavel Borzenkov2011-11-071-86/+82
| | | | | | | Before the next patches, fix coding style of the affected functions. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* use qemu_* ctype functionsChristoph Egger2011-09-211-1/+1
| | | | | | | Fix "warning: array subscript has type 'char'" on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* cmd: fix operator precedenceFrediano Ziglio2011-06-201-3/+3
| | | | | Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* qemu-io: check registered fds in command_loop()MORITA Kazutaka2010-06-221-3/+30
| | | | | | | | | | | | | | Some block drivers use an aio handler and do I/O completion routines in it. However, the handler is not invoked if we only do aio_read/write, because registered fds are not checked at all. This patch registers an aio handler of STDIO to checks whether we can read a command without blocking, and calls qemu_aio_wait() in command_loop(). Any other handlers can be invoked when user input is idle. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Fix dead initialization, spotted by clang analyzerBlue Swirl2010-04-251-1/+2
| | | | | | | | | | 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 char *p = result; Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix OpenBSD build of qemu-ioBlue Swirl2009-11-211-2/+1
| | | | | | | | | GCC 3.3.5 generates warnings for static forward declarations of data, so rearrange code to use static forward declarations of functions instead. Use <getopt.h> for optind instead of local definition. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix indentationStefan Weil2009-09-191-3/+3
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* qemu-io: Improve portability (win32 now supported).Stefan Weil2009-09-091-1/+22
| | | | | | | | | * Add missing include for struct timeval. * Replace non-portable strsep by local qemu_strsep. * Use POSIX basename by including libgen.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Update to a hopefully more future proof FSF addressBlue Swirl2009-07-161-2/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix a few Sparse warningsblueswir12009-04-071-2/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7016 c046a42c-6fe2-441c-8c8c-71466251a162
* Add files not included in previous commit.aliguori2009-04-051-0/+565
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6995 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud