Re: [PATCH -v2 2/3] mke2fs: print extra information about existing ext2/3/4 file systems
From: Lukáš Czerner <hidden>
Date: 2014-05-07 08:16:01
On Tue, 6 May 2014, Theodore Ts'o wrote:
Date: Tue, 6 May 2014 22:46:21 -0400 From: Theodore Ts'o <tytso@mit.edu> To: Lukáš Czerner <redacted> Cc: Ext4 Developers List <redacted> Subject: Re: [PATCH -v2 2/3] mke2fs: print extra information about existing ext2/3/4 file systems On Tue, May 06, 2014 at 03:42:37PM +0200, Lukáš Czerner wrote:quoted
quoted
+ retval = ext2fs_open2(device, 0, 0, 0, 0, unix_io_manager, &fs);Sorry for not noticing this earlier, but we might want to pass EXT2_FLAG_64BITS.Done.quoted
quoted
+ } else if (sb->s_mkfs_time) { + tm = sb->s_mkfs_time; + printf(_("\tcreated on %s"), ctime(&tm)); + } else if (sb->s_mkfs_time) {This does not seem right, you've already checked for s_mkfs_time and if was not set if you got here. I guess, it should be something else ? s_wtime perhaps ? But, can this be set when the fs was not mounted (like using ext2fs library ?)quoted
+ tm = sb->s_mtime;If you got here, then again this is not set.Yes, that's a cut and paste typo, thanks for spotting it. It should have been: } else if (sb->s_mkfs_time) { tm = sb->s_mkfs_time; printf(_("\tcreated on %s"), ctime(&tm)); } else if (sb->s_mtime) { <========
But you're already checking for sb->s_mtime in the first condition, am I missing something ? Thanks! -Lukas
tm = sb->s_mtime;
printf(_("\tlast modified on %s"), ctime(&tm));
}
Cheers,
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html