3 # Check the sizes of Stage 2 and Stage 1.5's.
4 # Copyright (C) 1999,2004 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # Written by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
23 # This function checks if the size of the first argument (filename) is
24 # greater than the second argument (limit). If so, then exit with the
25 # status 1, otherwise do nothing.
30 set dummy
`ls -l $file`
32 if test $size -gt $limit; then
33 echo "$file is too big ($size > $limit)."
38 # The bootloader area of a FFS partition is 14 sectors.
39 check ffs_stage1_5
7168
41 check ufs2_stage1_5
7168
43 # Stage 1.5 can be installed in the sectors immediately after MBR in the
44 # first cylinder, so the size is (63 - 1) sectors.
45 check fat_stage1_5
31744
48 check e2fs_stage1_5
31744
51 check minix_stage1_5
31744