]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/inst/isfat
use /n/other for tmp storage
[plan9front.git] / rc / bin / inst / isfat
1 #!/bin/rc
2
3 rfork e
4
5 # 0000000  eb 3c 90  P  l  a  n  9  .  0  0 00 02 04 02 00
6 # 0000010  02 00 02 02  P f8 14 00  ? 00 ff 00  ~ 04  } 00
7 # 0000020  02  P 00 00 80 00  ) a8 04  } 00  C  Y  L  I  N
8 # 0000030   D  R  I  C  A  L  F  A  T  1  6          fa 8c
9
10 if(! ~ $#* 1) {
11         echo 'usage: isfat /dev/sdC0/part' >[1=2]
12         exit usage
13 }
14
15 arg=$1
16 fn fat {
17         cmp -s <{dd -if $arg -bs 1 -count 3 -skip $1 >[2]/dev/null} <{echo -n FAT}
18 }
19
20 fat 54 || fat 82
21 exit $status
22