* the containing directory.
* %r <blkcount> interpret blkcount as refcount
* %s <str> miscellaneous string
+ * %t time (in <num>)
+ * %T current time
+ * %U quota type (in <num>)
* %S backup superblock
* %X <num> hexadecimal format
*
#include <string.h>
#include <ctype.h>
#include <termios.h>
+#include "support/quotaio.h"
#include "e2fsck.h"
-
#include "problem.h"
#ifdef __GNUC__
N_("Bbitmap"),
N_("ccompress"),
N_("Cconflicts with some other fs @b"),
- N_("iinode"),
- N_("Iillegal"),
- N_("jjournal"),
- N_("Ddeleted"),
N_("ddirectory"),
+ N_("Ddeleted"),
N_("eentry"),
N_("E@e '%Dn' in %p (%i)"),
N_("ffilesystem"),
N_("Ffor @i %i (%Q) is"),
N_("ggroup"),
N_("hHTREE @d @i"),
+ N_("iinode"),
+ N_("Iillegal"),
+ N_("jjournal"),
N_("llost+found"),
N_("Lis a link"),
N_("mmultiply-claimed"),
static int do_gmt = -1;
#ifdef __dietlibc__
- /* The diet libc doesn't respect the TZ environemnt variable */
+ /* The diet libc doesn't respect the TZ environment variable */
if (do_gmt == -1) {
time_str = getenv("TZ");
if (!time_str)
time_str = "";
- do_gmt = !strcmp(time_str, "GMT0");
+ do_gmt = !strcmp(time_str, "GMT") ||
+ !strcmp(time_str, "GMT0");
}
#endif
time_str = asctime((do_gmt > 0) ? gmtime(&t) : localtime(&t));
fprintf(f, "%u", large_inode->i_extra_isize);
break;
case 'b':
- if (fs->super->s_feature_ro_compat &
- EXT4_FEATURE_RO_COMPAT_HUGE_FILE)
+ if (ext2fs_has_feature_huge_file(fs->super))
fprintf(f, "%llu", inode->i_blocks +
(((long long) inode->osd2.linux2.l_i_blocks_hi)
<< 32));
case 'T':
print_time(f, e2fsck_ctx ? e2fsck_ctx->now : time(0));
break;
+ case 'U':
+ switch (ctx->num) {
+ case USRQUOTA:
+ m = _("user");
+ break;
+ case GRPQUOTA:
+ m = _("group");
+ break;
+ case PRJQUOTA:
+ m = _("project");
+ break;
+ default:
+ m = _("unknown quota type");
+ break;
+ }
+ if (*first && islower(m[0]))
+ fputc(toupper(*m++), f);
+ fputs(m, f);
+ if (ctx->num > PRJQUOTA)
+ fprintf(f, " %d", (int) ctx->num);
+ break;
case 'x':
fprintf(f, "0x%0*x", width, ctx->csum1);
break;