[OpenBIOS] r543 - trunk/openbios-devel/modules
svn at openbios.org
svn at openbios.org
Sun Aug 9 00:42:53 CEST 2009
Author: laurent
Date: 2009-08-09 00:42:52 +0200 (Sun, 09 Aug 2009)
New Revision: 543
Modified:
trunk/openbios-devel/modules/disk-label.c
Log:
Add DPRINTF() to disk-label.c
Modified: trunk/openbios-devel/modules/disk-label.c
===================================================================
--- trunk/openbios-devel/modules/disk-label.c 2009-08-08 22:00:10 UTC (rev 542)
+++ trunk/openbios-devel/modules/disk-label.c 2009-08-08 22:42:52 UTC (rev 543)
@@ -19,6 +19,15 @@
#include "libc/diskio.h"
#include "modules.h"
+//#define DEBUG_DISK_LABEL
+
+#ifdef DEBUG_DISK_LABEL
+#define DPRINTF(fmt, args...) \
+do { printk("DISK-LABEL - %s: " fmt, __func__ , ##args); } while (0)
+#else
+#define DPRINTF(fmt, args...) do { } while (0)
+#endif
+
typedef struct {
int fd;
@@ -55,7 +64,7 @@
xt_t xt;
parstr = my_args_copy();
- /* printk("dlabel-open '%s'\n", parstr ); */
+ DPRINTF("dlabel-open '%s'\n", parstr );
if( (fd=open_ih(my_parent())) == -1 )
goto out;
@@ -79,6 +88,7 @@
filename++;
}
}
+ DPRINTF("parstr %s filename %s\n", parstr, filename);
/* try to see if there is a filesystem without partition */
@@ -181,13 +191,13 @@
if( pos != -1 )
pos += offs;
else if( size ) {
- /* printk("Seek EOF\n"); */
+ DPRINTF("Seek EOF\n");
pos = offs + size;
} else {
/* let parent handle the EOF seek. */
}
- /* printk("dlabel_seek: %x %08x\n", (int)(pos>>32), (int)pos ); */
+ DPRINTF("dlabel_seek: %x %08x\n", (int)(pos>>32), (int)pos );
ret = seek_io( di->fd, pos );
PUSH( ret );
}
More information about the OpenBIOS
mailing list