summaryrefslogtreecommitdiff
path: root/rc/bin/fstype
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-07-30 20:34:45 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-07-30 20:34:45 +0200
commit98d518cc8c1ff7d1440ebffb9f546d3e0e149d60 (patch)
treeb595fca5a5e63e54a2740815cac0d34eff629588 /rc/bin/fstype
parenta39ce6a934c4d19cb2386ddefdc50670cb600ae6 (diff)
fstype: fix kfs detection (thanks kenji okomoto)
Diffstat (limited to 'rc/bin/fstype')
-rwxr-xr-xrc/bin/fstype6
1 files changed, 5 insertions, 1 deletions
diff --git a/rc/bin/fstype b/rc/bin/fstype
index 1820e8287..71e3adba9 100755
--- a/rc/bin/fstype
+++ b/rc/bin/fstype
@@ -23,9 +23,13 @@ if(~ $"m 011ce50d){
echo hjfs
exit
}
+m=`{dd -if $1 -bs 16 -count 1 -skip 16 >[2]/dev/null}
+if(~ $"m 'kfs wren device'){
+ echo kfs
+ exit
+}
dd -if $1 -count 1 >[2]/dev/null | \
awk '
-/^kfs/{fs["kfs"]++}
/^(blocksize|daddrbits|daddrbits|indirblks|dirblks|namelen)/{p[$1]=$2}
END{
ca["fs", "blocksize"] = 4*1024