On Wed, Apr 7, 2010 at 1:37 PM, arshad hussain <arshad.super@xxxxxxxxx> wrote: > On Wed, Apr 7, 2010 at 1:10 PM, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote: >> On Wed, Apr 7, 2010 at 1:06 PM, nidhi mittal hada >> <nidhimittal19@xxxxxxxxx> wrote: >>> hello All >>> >>> I want to get some of filesystem specific information >>> like blocksize , s_blocks_per_group >>> etc in userspace c program >>> >>> How do i get it ? >> >> Use libext2fs or see the code of dumpe2fs My bad. I jumped to answer without going through the question throughly. Manish is correct, in case your requirement is to get FS blk size etc ... through userspace 'c' program libext2fs is the way. One another way is to read fs partition or img raw read in first 1024 bytes and cast it to super block struct. You will be need to include ext2_fs.h. Thanks > debugfs . Assuming you want it for ext2/3/4. > > Thanks. >> >>> i have obtained block size by stat() function >>> but not more than that :( >>> >>> >>> >>> >>> -- >>> Thanks & Regards >>> Nidhi Mittal Hada >>> Scientific officer D >>> Computer Division >>> Bhabha Atomic Research Center >>> Mumbai >>> >>> >>> >> >> >> >> -- >> Thanks - >> Manish >> ================================== >> [$\*.^ -- I miss being one of them >> ================================== >> >> -- >> To unsubscribe from this list: send an email with >> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx >> Please read the FAQ at http://kernelnewbies.org/FAQ >> >> > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ