extern int optind;
extern char *optarg;
#endif
-#ifdef HAVE_OPTRESET
-extern int optreset; /* defined by BSD, but not others */
-#endif
#include "debugfs.h"
static const char *monstr[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
-static int list_dir_proc(ext2_ino_t dir,
+static int list_dir_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
int entry,
struct ext2_dir_entry *dirent,
- int offset,
- int blocksize,
- char *buf,
+ int offset EXT2FS_ATTR((unused)),
+ int blocksize EXT2FS_ATTR((unused)),
+ char *buf EXT2FS_ATTR((unused)),
void *private)
{
struct ext2_inode inode;
strcpy(datestr, " ");
memset(&inode, 0, sizeof(struct ext2_inode));
}
- fprintf(ls->f, "%c%6u%c %6o %5d %5d ", lbr, ino, rbr,
- inode.i_mode, inode.i_uid, inode.i_gid);
+ fprintf(ls->f, "%c%6u%c %6o (%d) %5d %5d ", lbr, ino, rbr,
+ inode.i_mode, dirent->name_len >> 8,
+ inode.i_uid, inode.i_gid);
if (LINUX_S_ISDIR(inode.i_mode))
fprintf(ls->f, "%5d", inode.i_size);
else
if (check_fs_open(argv[0]))
return;
- optind = 0;
-#ifdef HAVE_OPTRESET
- optreset = 1; /* Makes BSD getopt happy */
-#endif
+ reset_getopt();
while ((c = getopt (argc, argv, "dl")) != EOF) {
switch (c) {
case 'l':