How to differentiate ext4 from ext2/3 in code?

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

 



Hello,

I am working on a software which has its own code to mount file systems, but 
when working on adding ext4 support I just noticed something strange. The 
ext2/3 reader already works quite well for ext4!

Also: EXT2_SUPER_MAGIC == EXT3_SUPER_MAGIC == EXT4_SUPER_MAGIC

So does anyone know what is the best way to differentiate in a file system 
reader between ext3 and ext4?

The best I came up so far would be checking the size of the superblock ... for 
ext3 it seams to be smaller I think ... but I guess people here might have 
better ideas.

thanks,

Felipe Monteiro de Carvalho

--
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