mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
fs/ and lib/ debug can be selectively enabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@406 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -247,6 +247,7 @@
|
||||
0.3.3 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Removed unused uIP files
|
||||
* sched/, mm/, net/ subystem debug can not be selectively enabled/disabled
|
||||
* sched/, mm/, and net/ subystem debug can not be selectively enabled/disabled
|
||||
* Correct socket close logic -- needs to disconnect TCP socket on close
|
||||
* uIP webserver now seems to be fully functional
|
||||
* fs/ and lib/ subystem debug can not be selectively enabled/disabled
|
||||
|
||||
@@ -727,9 +727,10 @@ Other memory:
|
||||
0.3.3 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Removed unused uIP files
|
||||
* sched/, mm/, net/ subystem debug can not be selectively enabled/disabled
|
||||
* sched/, mm/, and net/ subystem debug can not be selectively enabled/disabled
|
||||
* Correct socket close logic -- needs to disconnect TCP socket on close
|
||||
* uIP webserver now seems to be fully functional
|
||||
* fs/ and lib/ subystem debug can not be selectively enabled/disabled
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
|
||||
@@ -1196,6 +1196,9 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
<li>
|
||||
<code>CONFIG_DEBUG</code>: enables built-in debug options
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_VERBOSE</code>: enables verbose debug output
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_SCHED</code>: enable OS debug output (disabled by default)
|
||||
</li>
|
||||
@@ -1203,10 +1206,13 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
<code>CONFIG_DEBUG_MM</code>: enable memory management debug output (disabld by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_NET</code>: enable networkd debug output (disabled by default)
|
||||
<code>CONFIG_DEBUG_NET</code>: enable network debug output (disabled by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_VERBOSE</code>: enables verbose debug output
|
||||
<code>CONFIG_DEBUG_FS</code>: enable filesystem debug output (disabled by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_LIB</code>: enable C library debug output (disabled by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_HAVE_LOWPUTC</code>: architecture supports low-level, boot
|
||||
|
||||
@@ -49,6 +49,7 @@ o Network
|
||||
is in the subnet served by the driver.
|
||||
- uIP/Socket callback logic is not thread safe. This means that a socket cannot be
|
||||
used concurrently by two threads. Minimal fix: Add mutex to support exclusion.
|
||||
- IPv6 support is incomplete
|
||||
|
||||
o USB
|
||||
- Implement USB device support
|
||||
|
||||
@@ -132,6 +132,10 @@ defconfig -- This is a configuration file similar to the Linux
|
||||
(disabld by default)
|
||||
CONFIG_DEBUG_NET - enable network debug output (disabled
|
||||
by default)
|
||||
CONFIG_DEBUG_FS - enable filesystem debug output (disabled
|
||||
by default)
|
||||
CONFIG_DEBUG_LIB - enable C library debug output (disabled
|
||||
by default)
|
||||
CONFIG_HAVE_LOWPUTC - architecture supports low-level, boot
|
||||
time console output
|
||||
CONFIG_MM_REGIONS - If the architecture includes multiple
|
||||
|
||||
+16
-16
@@ -695,22 +695,22 @@ int fat_mount(struct fat_mountpt_s *fs, boolean writeable)
|
||||
|
||||
/* We did it! */
|
||||
|
||||
dbg("FAT%d:\n", fs->fs_type == 0 ? 12 : fs->fs_type == 1 ? 16 : 32);
|
||||
dbg("\tHW sector size: %d\n", fs->fs_hwsectorsize);
|
||||
dbg("\t sectors: %d\n", fs->fs_hwnsectors);
|
||||
dbg("\tFAT reserved: %d\n", fs->fs_fatresvdseccount);
|
||||
dbg("\t sectors: %d\n", fs->fs_fattotsec);
|
||||
dbg("\t start sector: %d\n", fs->fs_fatbase);
|
||||
dbg("\t root sector: %d\n", fs->fs_rootbase);
|
||||
dbg("\t root entries: %d\n", fs->fs_rootentcnt);
|
||||
dbg("\t data sector: %d\n", fs->fs_database);
|
||||
dbg("\t FSINFO sector: %d\n", fs->fs_fsinfo);
|
||||
dbg("\t Num FATs: %d\n", fs->fs_fatnumfats);
|
||||
dbg("\t FAT size: %d\n", fs->fs_fatsize);
|
||||
dbg("\t sectors/cluster: %d\n", fs->fs_fatsecperclus);
|
||||
dbg("\t max clusters: %d\n", fs->fs_nclusters);
|
||||
dbg("\tFSI free count %d\n", fs->fs_fsifreecount);
|
||||
dbg("\t next free %d\n", fs->fs_fsinextfree);
|
||||
fdbg("FAT%d:\n", fs->fs_type == 0 ? 12 : fs->fs_type == 1 ? 16 : 32);
|
||||
fdbg("\tHW sector size: %d\n", fs->fs_hwsectorsize);
|
||||
fdbg("\t sectors: %d\n", fs->fs_hwnsectors);
|
||||
fdbg("\tFAT reserved: %d\n", fs->fs_fatresvdseccount);
|
||||
fdbg("\t sectors: %d\n", fs->fs_fattotsec);
|
||||
fdbg("\t start sector: %d\n", fs->fs_fatbase);
|
||||
fdbg("\t root sector: %d\n", fs->fs_rootbase);
|
||||
fdbg("\t root entries: %d\n", fs->fs_rootentcnt);
|
||||
fdbg("\t data sector: %d\n", fs->fs_database);
|
||||
fdbg("\t FSINFO sector: %d\n", fs->fs_fsinfo);
|
||||
fdbg("\t Num FATs: %d\n", fs->fs_fatnumfats);
|
||||
fdbg("\t FAT size: %d\n", fs->fs_fatsize);
|
||||
fdbg("\t sectors/cluster: %d\n", fs->fs_fatsecperclus);
|
||||
fdbg("\t max clusters: %d\n", fs->fs_nclusters);
|
||||
fdbg("\tFSI free count %d\n", fs->fs_fsifreecount);
|
||||
fdbg("\t next free %d\n", fs->fs_fsinextfree);
|
||||
|
||||
return OK;
|
||||
|
||||
|
||||
@@ -112,6 +112,26 @@
|
||||
# define nvdbg(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
# define fdbg(format, arg...) dbg(format, ##arg)
|
||||
# define flldbg(format, arg...) lldbg(format, ##arg)
|
||||
# define fvdbg(format, arg...) vdbg(format, ##arg)
|
||||
#else
|
||||
# define fdbg(x...)
|
||||
# define flldbg(x...)
|
||||
# define fvdbg(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_LIB
|
||||
# define ldbg(format, arg...) dbg(format, ##arg)
|
||||
# define llldbg(format, arg...) lldbg(format, ##arg)
|
||||
# define lvdbg(format, arg...) vdbg(format, ##arg)
|
||||
#else
|
||||
# define ldbg(x...)
|
||||
# define llldbg(x...)
|
||||
# define lvdbg(x...)
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
* Public Type Declarations
|
||||
************************************************************/
|
||||
|
||||
+4
-4
@@ -103,7 +103,7 @@ char *getenv(const char *name)
|
||||
const char *pend = &environment[size-1];
|
||||
const char *ptmp;
|
||||
|
||||
dbg("name=\"%s\"\n", name);
|
||||
ldbg("name=\"%s\"\n", name);
|
||||
|
||||
if (name)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ char *getenv(const char *name)
|
||||
|
||||
while (penv < pend)
|
||||
{
|
||||
vdbg("Compare to=\"%s\"\n", penv);
|
||||
lvdbg("Compare to=\"%s\"\n", penv);
|
||||
|
||||
/* The logic below basically implements a version of
|
||||
* strcmp where the strings may be terminated with = signs.
|
||||
@@ -130,7 +130,7 @@ char *getenv(const char *name)
|
||||
{
|
||||
/* Yes.. return the pointer to the value. */
|
||||
|
||||
dbg("Returning \"%s\"\n", penv+1);
|
||||
ldbg("Returning \"%s\"\n", penv+1);
|
||||
return ((char*)penv+1);
|
||||
}
|
||||
else
|
||||
@@ -165,6 +165,6 @@ char *getenv(const char *name)
|
||||
|
||||
/* If we got here, then no matching string was found. */
|
||||
|
||||
dbg("Returning NULL\n");
|
||||
ldbg("Returning NULL\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+12
-12
@@ -121,7 +121,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
const char *tc;
|
||||
char tmp[MAXLN];
|
||||
|
||||
vdbg("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, s);
|
||||
lvdbg("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, s);
|
||||
|
||||
count = noassign = width = lflag = 0;
|
||||
while (*s && *buf)
|
||||
@@ -135,13 +135,13 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
|
||||
if (*s == '%')
|
||||
{
|
||||
vdbg("vsscanf: Specifier found\n");
|
||||
lvdbg("vsscanf: Specifier found\n");
|
||||
|
||||
/* Check for qualifiers on the conversion specifier */
|
||||
s++;
|
||||
for (; *s; s++)
|
||||
{
|
||||
vdbg("vsscanf: Processing %c\n", *s);
|
||||
lvdbg("vsscanf: Processing %c\n", *s);
|
||||
|
||||
if (strchr("dibouxcsefg%", *s))
|
||||
break;
|
||||
@@ -163,7 +163,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
|
||||
if (*s == 's')
|
||||
{
|
||||
vdbg("vsscanf: Performing string conversion\n");
|
||||
lvdbg("vsscanf: Performing string conversion\n");
|
||||
|
||||
while (isspace(*buf))
|
||||
buf++;
|
||||
@@ -184,7 +184,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
|
||||
else if (*s == 'c')
|
||||
{
|
||||
vdbg("vsscanf: Performing character conversion\n");
|
||||
lvdbg("vsscanf: Performing character conversion\n");
|
||||
|
||||
if (!width)
|
||||
width = 1;
|
||||
@@ -201,7 +201,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
|
||||
else if (strchr("dobxu", *s))
|
||||
{
|
||||
vdbg("vsscanf: Performing integer conversion\n");
|
||||
lvdbg("vsscanf: Performing integer conversion\n");
|
||||
|
||||
/* Skip over any white space before the integer string */
|
||||
|
||||
@@ -237,7 +237,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
strncpy(tmp, buf, width);
|
||||
tmp[width] = '\0';
|
||||
|
||||
vdbg("vsscanf: tmp[]=\"%s\"\n", tmp);
|
||||
lvdbg("vsscanf: tmp[]=\"%s\"\n", tmp);
|
||||
|
||||
/* Perform the integer conversion */
|
||||
|
||||
@@ -251,7 +251,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
#else
|
||||
int tmpint = strtol(tmp, NULL, base);
|
||||
#endif
|
||||
vdbg("vsscanf: Return %d to 0x%p\n", tmpint, pint);
|
||||
lvdbg("vsscanf: Return %d to 0x%p\n", tmpint, pint);
|
||||
*pint = tmpint;
|
||||
}
|
||||
}
|
||||
@@ -264,10 +264,10 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
# warning "No floating point conversions"
|
||||
void *pv = va_arg(ap, void*);
|
||||
|
||||
vdbg("vsscanf: Return 0.0 to %p\n", pv);
|
||||
lvdbg("vsscanf: Return 0.0 to %p\n", pv);
|
||||
*((double_t*)pv) = 0.0;
|
||||
#else
|
||||
vdbg("vsscanf: Performing floating point conversion\n");
|
||||
lvdbg("vsscanf: Performing floating point conversion\n");
|
||||
|
||||
/* Skip over any white space before the real string */
|
||||
|
||||
@@ -293,7 +293,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
tmp[width] = '\0';
|
||||
buf += width;
|
||||
|
||||
vdbg("vsscanf: tmp[]=\"%s\"\n", tmp);
|
||||
lvdbg("vsscanf: tmp[]=\"%s\"\n", tmp);
|
||||
|
||||
/* Perform the floating point conversion */
|
||||
|
||||
@@ -308,7 +308,7 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
#endif
|
||||
void *pv = va_arg(ap, void*);
|
||||
|
||||
vdbg("vsscanf: Return %f to %p\n", dvalue, pv);
|
||||
lvdbg("vsscanf: Return %f to %p\n", dvalue, pv);
|
||||
|
||||
/* But we have to check whether we need to return a
|
||||
* float or a double.
|
||||
|
||||
Reference in New Issue
Block a user