search for: dprintf

Displaying 20 results from an estimated 385 matches for "dprintf".

Did you mean: dprintk
2006 Oct 09
1
Vorbis primitive API examples (LONG)
...uot; #ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */ #include <io.h> #include <fcntl.h> #endif #if defined(__MACOS__) && defined(__MWERKS__) #include <console.h> /* CodeWarrior's Mac "command-line" support */ #endif #define dprintf(...) fprintf(stderr, __VA_ARGS__) #define BCHUNKSIZE 8192 static long bytesConsumed = 0; // FIXME: This is one of the places that can throw errors int grabData(ogg_sync_state *oy) { unsigned char* bb = ogg_sync_bufferin(oy, BCHUNKSIZE); long bytesRead = fread(bb, 1, BCHUNKSIZE, stdin); dp...
2015 Feb 08
3
[PATCH 0/1] dprintf: add debug console support
...by SeaBIOS and OVMF), add "-DDEBUG_IO_PORT=0x402 -DCORE_DEBUG=1" to the build CFLAGS. To enable a debug console in QEMU that listens to I/O port 0x402 and prints to stdio, add "-debugcon stdio -global isa-debugcon.iobase=0x402" to the QEMU command line. Jonathan Boeing (1): dprintf: add debug console support com32/include/dprintf.h | 2 +- com32/lib/dprintf.c | 4 ++-- com32/lib/vdprintf.c | 21 ++++++++++++++++++++- core/lwip/src/netif/undiif.c | 2 +- mk/devel.mk | 1 + 5 files changed, 25 insertions(+), 5 deletions(-) -- 2.3.0
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...8_t *sense_buf, uint32_t sense) } /* Helper function for command completion. */ -static void scsi_command_complete(SCSIRequest *r, int status, int sense) +static void scsi_command_complete(SCSIRequest *r, int status, uint32_t sense) { SCSIDiskState *s = r->dev; uint32_t tag; - DPRINTF("Command complete tag=0x%x status=%d sense=%d\n", r->tag, status, sense); - s->sense = sense; + + DPRINTF("Command complete tag=0x%x status=%d sense=%d\n", r->tag, + status, s->sense_len); + if (status == STATUS_CHECK_CONDITION) { + s->sense_len = scs...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...8_t *sense_buf, uint32_t sense) } /* Helper function for command completion. */ -static void scsi_command_complete(SCSIRequest *r, int status, int sense) +static void scsi_command_complete(SCSIRequest *r, int status, uint32_t sense) { SCSIDiskState *s = r->dev; uint32_t tag; - DPRINTF("Command complete tag=0x%x status=%d sense=%d\n", r->tag, status, sense); - s->sense = sense; + + DPRINTF("Command complete tag=0x%x status=%d sense=%d\n", r->tag, + status, s->sense_len); + if (status == STATUS_CHECK_CONDITION) { + s->sense_len = scs...
2015 Apr 14
2
debugging pxelinux
...with this, by trying to insert printfs in pxe_init, but nothing gets printed. I can spew lots of output if I set DEBUGOPT = -DDEBUG=1 -DDEBUG_STDIO -DCORE_DEBUG=1 but given that this box doesn't have a serial port, anything I add will whizz off the screen. >From looking at com32/include/dprintf.h, it looks as though all this does is to define dprintf to printf, so why is it that if don't define DEBUG_STDIO and CORE_DEBUG, and just use printf directly, nothing appears? I assume (given the dprintfs) that ldlinux.c32 is loaded by the time pxe_init is run, so printf calls should be legal...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...ci.h" +#include "scsi.h" +#include "scsi-disk.h" +#include "block_int.h" +#ifdef __linux__ +# include <scsi/sg.h> +#endif + +#undef DEBUG_MEGASAS +#undef DEBUG_MEGASAS_REG +#undef DEBUG_MEGASAS_QUEUE +#undef DEBUG_MEGASAS_MFI + +#ifdef DEBUG_MEGASAS +#define DPRINTF(fmt, ...) \ +do { printf("megasas: " fmt , ## __VA_ARGS__); } while (0) +#define BADF(fmt, ...) \ +do { fprintf(stderr, "megasas: error: " fmt , ## __VA_ARGS__); exit(1);} while (0) +#else +#define DPRINTF(fmt, ...) do {} while(0) +#define BADF(fmt, ...) \ +do { fprintf(stderr,...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...ci.h" +#include "scsi.h" +#include "scsi-disk.h" +#include "block_int.h" +#ifdef __linux__ +# include <scsi/sg.h> +#endif + +#undef DEBUG_MEGASAS +#undef DEBUG_MEGASAS_REG +#undef DEBUG_MEGASAS_QUEUE +#undef DEBUG_MEGASAS_MFI + +#ifdef DEBUG_MEGASAS +#define DPRINTF(fmt, ...) \ +do { printf("megasas: " fmt , ## __VA_ARGS__); } while (0) +#define BADF(fmt, ...) \ +do { fprintf(stderr, "megasas: error: " fmt , ## __VA_ARGS__); exit(1);} while (0) +#else +#define DPRINTF(fmt, ...) do {} while(0) +#define BADF(fmt, ...) \ +do { fprintf(stderr,...
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...internal.h" /* kind of dirty, but it should be fine.. */ +#include "sql-api-private.h" + +#ifdef BUILD_MULTI_PGSQL +#include <ctype.h> +#include <stdlib.h> +#include <time.h> +#include <libpq-fe.h> + +/* macros */ +/* #define DEBUG */ +#ifdef DEBUG +# define dprintf(args) i_info args +#else +# define dprintf(args) +#endif + +#define DEINIT_ERROR "db driver deinit" +#define TIMEOUT_ERROR "query timed out" + +/* constants */ +enum { + MULTI_PGSQL_POOL = 512, + MULTI_PGSQL_XACT_POOL = 1024, + + TIMEOUT_UNIT = 1000, + + RECONNECT_DELAY =...
2007 Jan 11
0
[PATCH 6/8] HVM save restore: guest memory handling
...ng mfn, pfn; + unsigned int prev_pc, this_pc; + int verify = 0; + + /* Types of the pfns in the current region */ + unsigned long region_pfn_type[MAX_BATCH_SIZE]; + + /* hvm guest mem size (Mb) */ + memsize = (unsigned long long)*store_mfn; + v_end = memsize << 20; + + DPRINTF("xc_hvm_restore:dom=%d, nr_pfns=0x%lx, store_evtchn=%d, *store_mfn=%ld, console_evtchn=%d, *console_mfn=%ld, pae=%u, apic=%u.\n", + dom, nr_pfns, store_evtchn, *store_mfn, console_evtchn, *console_mfn, pae, apic); + + max_pfn = nr_pfns; + + if(!get_platform_info(xc_handl...
2014 Feb 20
2
[PATCH] NTFS: fragmented $MFT file was not handled
...nt32_t mft_record_shift = ilog2(mft_record_size); const uint32_t clust_byte_shift = NTFS_SB(fs)->clust_byte_shift; - uint64_t lcn; - int err; - struct ntfs_mft_record *mrec; + uint64_t next_offset = 0; + uint64_t lcn = 0; + block_t blk = 0; + uint64_t offset = 0; - dprintf("in %s()\n", __func__); + struct ntfs_mft_record *mrec = NULL, *lmrec = NULL; + uint64_t start_blk = 0; + struct ntfs_attr_record *attr = NULL; + uint8_t *stream = NULL; + uint32_t attr_offset = 0; + uint8_t *attr_len = NULL; + struct mapping_chunk chunk; - buf =...
2006 Aug 21
1
[PATCH 3 of 6] dm-userspace internal libdmu support for userspace tool
....h> +#include <stdint.h> +#include <string.h> +#include <unistd.h> +#include <stdlib.h> +#include <libdevmapper.h> +#include <linux/dm-userspace.h> + +#include <dmu.h> + +#define DMU_MSG_DEBUG 0 + +#define QUEUE_SIZE_KB 4096 + +#if DMU_MSG_DEBUG +#define DPRINTF( s, arg... ) fprintf(stderr, s, ##arg) +#else +#define DPRINTF( s, arg... ) +#endif + +struct dmu_events { + status_handler status_fn; + map_req_handler map_fn; +}; + +struct dmu_event_data { + void *status_user_data; + void *map_user_data; +}; + +struct dmu_context { + int fd; + unsigned int buf_s...
2008 Mar 10
12
[RFC][PATCH] Use ioemu block drivers through blktap
When I submitted the qcow2 patch for blktap, suggestions came up that the qemu block drivers should be used also for blktap to eliminate the current code duplication in ioemu and blktap. The attached patch adds support for a tap:ioemu pseudo driver. Devices using this driver won''t use tapdisk (containing the code duplication) any more, but will connect to the qemu-dm of the domain. In
2013 Jul 12
1
[PATCH 001/001] core/serial: Add support for serial output functions.
...r serial_print or serial_puts as you would use printf and puts respectivelly. >> >> For QEMU, you only need to specify the option -serial stdio. >> If you use another VM, find how you can redirect the serial port to stdio. >> > > Hi, > > How does this differ from dprintf()? > > -hpa > > Enabling dprintf, a bunch of info will be dumped into serial line. I'm not aware of filters for dprintf though. By using this function, you can print out only what you're currently working on. Regards, Raphael S. Carvalho.
2015 Feb 10
3
[PATCH 0/2] fix a couple cosmetic issues
Fixes some typos and missing newlines Jonathan Boeing (2): fix a few typos add missing '\n' to dprintf com32/include/sys/module.h | 2 +- com32/lib/sys/module/exec.c | 4 ++-- core/fs/fs.c | 2 +- core/lwip/src/netif/undiif.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) -- 2.3.0
2011 Mar 09
14
[PATCH 00/12] elflink shrinkage
...st (and only) parse of the config file, not to mention the fact that we only need one copy of the parser now. Other functions will be converted from asm to C later. This series is also available at, git://git.zytor.com/users/mfleming/syslinux.git elflink-readconfig-for-hpa Matt Fleming (12): dprintf: Print to stdout as well as serial ports elflink: Remove *.c32 on 'make clean' core: Be less verbose at boot elflink: Don't pass NULL to spawn_load() elflink: Move code out of core and into ldlinux.c32 elflink: Look for syslinux.cfg elflink: Move config data into config.h...
2012 May 07
14
Little help with blk ring
.../sector to be read ring_req->seg[0].gref = (bi->buffer_gref); //this should be get_free_gref(); ring_req->seg[0].first_sect = 0;//op->lba; ring_req->seg[0].last_sect = 7;//op->lba + op->count; RING_PUSH_REQUESTS_AND_CHECK_NOTIFY((priv),notify); //return notify=0 if(notify){ dprintf(1,"Start notify procedure\n"); evtchn_send_t send; send.port = (bi->port); dprintf(1,"In notify before hypercall port is %d\n",send.port); //hypercall_event_channel_op(EVTCHNOP_send, &send); dprintf(1,"HYPERCALL read operation notify res %d\n", hyperca...
2019 May 24
3
[PATCH] (vesa)menu.c32: Add support for BLS
...} + if (i >= 0) { + bwd[j] = version[i]; + } + } + + fwd = malloc(len + 1); + if (!fwd) + goto nomem; + + tmp = bwd; + for (i = len; i >= 0; i--) { + fwd[i] = *tmp; + tmp++; + } + free(bwd); + + return fwd; + +nomem: + dprintf("Out of memory error!\n"); + free(bwd); + free(fwd); + return NULL; +} + +static int parse_bls1_file(struct blsdata *bd, const char *filename) +{ + FILE *f = NULL; + char line[MAX_LINE], *p; + char *sort_field; + + dprintf("Opening bls entry: %s ", filename)...
2013 Sep 15
0
unify core printf()/dprintf(): thoughts?
...string prefix determines where the message is seen. Would something like this be useful in Syslinux? As I see it, there's essentially 3 separate printing methods with an additional variation. Goals: - To keep data size smaller, avoid 2+ identical static strings (akin to { printf(my_message); dprintf(my_message); } ) - To keep code size down, only output simple strings. ANSI Escape sequences should be passed through directly or stripped. Rough pseudocode: - Unless output to current console(VGA or serial) is forced by prefix, determine on-screen dynamic debug status of calling function. - Pos...
2014 Nov 22
3
Use z size specifier for printf-ing size_t variable
...r, namelen + 1, 0); memcpy(bp, filename, namelen); diff --git a/com32/mboot/map.c b/com32/mboot/map.c index 84f3b20..4b0baa2 100644 --- a/com32/mboot/map.c +++ b/com32/mboot/map.c @@ -61,7 +61,7 @@ addr_t map_data(const void *data, size_t len, size_t align, int flags) return 0; } - dprintf("Mapping 0x%08x bytes (%#x pad) at 0x%08x\n", len, pad, start); + dprintf("Mapping 0x%08zx bytes (%#x pad) at 0x%08x\n", len, pad, start); if (start + len + pad > mboot_high_water_mark) mboot_high_water_mark = start + len + pad; diff --git a/com32/menu/menumain.c...
2019 Jul 03
1
[libnbd PATCH] tests: Make errors more robust under load
...perror ("atexit"); + exit (EXIT_FAILURE); + } + if ((script_fd = mkstemp (script)) == -1) { + perror ("mkstemp"); + exit (EXIT_FAILURE); + } + if ((witness_fd = mkstemp (witness)) == -1) { + perror ("mkstemp"); + exit (EXIT_FAILURE); + } + + if (dprintf (script_fd, "case $1 in\n" + " get_size) echo 128m || exit 1 ;;\n" + " pread) printf 'ENOMEM ' >&2; exit 1 ;;\n" + " can_write) exit 0 ;;\n" + " pwrite)\n" + &q...