site  contact  subhomenews

ext4 support for save-file

April 27, 2012 — BarryK
01micko posted patches to add support for the ext4 filesystem in the save-file:
http://bkhome.org/archive/blog2/201204/devmouse-fix-in-full-hd-install.html

Thanks, I have implemented this, see commit (the relevant files are rc.shutdown and shutdownconfig):
http://bkhome.org/fossil/woof2.cgi/info/52c69e3b0e

Comments

ext4
Username: 01micko
Good to see you fixed the ext4 test, I was a bit lazy I guess. Subsequently, I did test outside of X and had no problem.

grep bug ?
Username: K Godt
"[code]| 334 [ -f /lib/modules/${KVER}/modules.builtin ] && [ "`grep 'fs/ext4`" != "" ] && HAVEEXT4='yes'[/code] looks buggy to me [ -f /lib/modules/${KVER}/modules.builtin ] && [ "`grep 'fs/ext4[u]'[/u]`" != "" ] && HAVEEXT4='yes' 1)grep is missing a single quote and 2)grep without filename will wait for inputs; in shutdown funny . I dont know where to grep fs/ext4 in a file or dir ? bash-3.2# [code]grep ext4 /lib/modules/`uname -r`/*[/code] /lib/modules/2.6.37.4-KRG-iatom-1/modules.builtin:kernel/fs/ext4/ext4.ko [code]ls /lib/modules/`uname -r`/kernel/fs[/code]

grep ext4 /proc/filesystems
Username: technosaurus
"That is really bad anyways - what if someday you decide to improve the kernel config to have builtin ext4(it would break)... a better method would be to use /proc/filesystems my personal opinion is that if it is in the initramfs, it should be built in if at all possible

ext4 test
Username: 01micko
"Hmmm.. I shouldn't be so lazy.. Shinobar's way is probably the best. [i]which mkfs.ext4 &>/dev/null if [ "$?" = "0" ];then [/i](and so on)

ext4 fixed
Username: BarryK
"K Godt, Oh dear, a major lapse of attention on my part. Thanks, fixed. technosaurus, The code does test for builtin ext4, using modules.builtin. And as a module using 'modinfo'. Probably not in the most efficient way though. Your suggestion to just test /proc/filesystems, yes, that is simplest, I will change to just that: [i]grep 'ext4$' /proc/filesystems[/i]

grep
Username: L18L
"simpler than simplest: [code]# grep ext4$ /proc/filesystems ext4 # [/code] (without quotes)


Tags: woof