linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to differentiate ext4 from ext2/3 in code?
@ 2013-05-31  7:04 Felipe Monteiro de Carvalho
  2013-05-31 15:28 ` Theodore Ts'o
  0 siblings, 1 reply; 4+ messages in thread
From: Felipe Monteiro de Carvalho @ 2013-05-31  7:04 UTC (permalink / raw)
  To: linux-ext4

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-12 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-31  7:04 How to differentiate ext4 from ext2/3 in code? Felipe Monteiro de Carvalho
2013-05-31 15:28 ` Theodore Ts'o
2013-06-03 17:16   ` Autif Khan
     [not found]     ` <CACyNnZOXuPWvCDtPuAnGD72g41LWLTyuou_gCKRPHm+ZWemyXA@mail.gmail.com>
2013-06-12 12:52       ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).