Re: [PATCH -v2 2/3] mke2fs: print extra information about existing ext2/3/4 file systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 May 2014, Theodore Ts'o wrote:

> Date: Tue, 6 May 2014 22:46:21 -0400
> From: Theodore Ts'o <tytso@xxxxxxx>
> To: Lukáš Czerner <lczerner@xxxxxxxxxx>
> Cc: Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>
> 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:
> > > +	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.
> 
> > > +	} 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 ?)
> > 
> > > +		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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux