Re: EXT2 as a module

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

 



Paulo da Silva escreveu:
rishi agrawal escreveu:

You can pick the whole dir of ext2, rename it to another name foo. Then
change all occurences of ext2 to foo, EXT2 to FOO, Ext2 to Foo  (this
one not sure if it exists) and you have a new filesystem foo. You may
need to change back some FOO or foo to EXT2 or ext2 because they are not
in the ext2 dir. These are general stuff, like bit operations that you
may not want to change at all. Other small changes that may occur are
also trivial.

I dit that changing ext2 to extp.
You may have to change this depending on the version of the kernel.

for f in $(ls *.c *.h Makefile); do
   echo $f
   sed -i \
       -e s/ext2/extp/g \
       -e s/EXT2/EXTP/g \
       -e s/extp_find_next_zero_bit/ext2_find_next_zero_bit/g \
       -e s/extp_set_bit_atomic/ext2_set_bit_atomic/g \
       -e s/extp_clear_bit_atomic/ext2_clear_bit_atomic/g \
       -e s/extp_test_bit/ext2_test_bit/g \
       -e s/extp_fsblk_t/ext2_fsblk_t/g \
       -e s/EXTP_SUPER_MAGIC/EXT2_SUPER_MAGIC/g \
           $f
done


HTH
Paulo

BTW, you may also need to copy the ext2* from
/usr/src/linux/include/linux and rename all files ext2* to extp*. Then
replace refs to #include <linux/* > to #include "*".



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux