procfs/: Extenstive architectural changes and enhancements by Ken Pettit

This commit is contained in:
Gregory Nutt 2013-12-12 09:21:55 -06:00
parent 1b4869300a
commit 46184187b3

View File

@ -194,31 +194,34 @@ static int df_man_readable_handler(FAR const char *mountpoint,
/* Find the label for size */ /* Find the label for size */
which = 0; which = 0;
while (size >= 9999 || (size & 0x3FF) == 0 && size) while (size >= 9999 || (size & 0x3ff) == 0 && size)
{ {
which++; which++;
size >>= 10; size >>= 10;
} }
sizelabel = labels[which]; sizelabel = labels[which];
/* Find the label for free */ /* Find the label for free */
which = 0; which = 0;
while (free >= 9999 || (free & 0x3FF) == 0 && size) while (free >= 9999 || (free & 0x3ff) == 0 && free)
{ {
which++; which++;
free >>= 10; free >>= 10;
} }
freelabel = labels[which]; freelabel = labels[which];
/* Find the label for used */ /* Find the label for used */
which = 0; which = 0;
while (used >= 9999 || (used & 0x3FF) == 0 && size) while (used >= 9999 || (used & 0x3ff) == 0 && used)
{ {
which++; which++;
used >>= 10; used >>= 10;
} }
usedlabel = labels[which]; usedlabel = labels[which];
#ifndef CONFIG_NUTTX_KERNEL #ifndef CONFIG_NUTTX_KERNEL