diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-05-02 01:21:55 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-05-02 01:21:55 +0000 |
commit | fa9a40027b8ced000ea1c3d2dc5ed8eb44c6ad90 (patch) | |
tree | bd92719db3cd95101730becdf2f7ef7612ea158e /rc/bin/fstype | |
parent | 8f7cdfa5e27bf4c086657f505a8a91725915bb82 (diff) |
boot(8): merge usb boot method into local
Diffstat (limited to 'rc/bin/fstype')
-rwxr-xr-x | rc/bin/fstype | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rc/bin/fstype b/rc/bin/fstype index c2fd65d9c..e2a46922a 100755 --- a/rc/bin/fstype +++ b/rc/bin/fstype @@ -1,10 +1,19 @@ #!/bin/rc +rfork e m=`{dd -if $1 -bs 2048 -skip 16 >[2]/dev/null | xd -c | sed 1q | \ sed 's/.........(....................).*/\1/; s/ //g'} if(~ $"m 01CD00101){ echo 9660 exit } +fn fat { + m=`{dd -if $1 -bs 1 -count 3 -skip $2 >[2]/dev/null} + ~ $"m FAT +} +if(fat $1 54 || fat $1 82){ + echo dos + exit +} dd -if $1 -count 1 >[2]/dev/null | \ awk ' /^kfs/{fs["kfs"]++} |