2 # verify that partition maxima-querying functions work
4 # Copyright (C) 2009-2012 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 3 of the License, or
9 # (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
19 . "${srcdir=.}/init.sh"; path_prepend_ ../parted
26 # FIXME: add aix when/if it's supported again
27 for t in msdos gpt dvh sun mac bsd amiga loop pc98; do
30 dd if=/dev/zero of=$dev bs=$ss count=1 seek=10000 || { fail=1; continue; }
31 parted -s $dev mklabel $t || { fail=1; continue; }
33 #case $t in pc98) sleep 999d;; esac
38 gpt|loop) max_start=18446744073709551615; max_len=$max_start;;
39 sun) max_start=549755813760;; # 128 * (2^32-1)
42 print-max $dev > out 2>&1 || fail=1
43 printf '%s\n' "max len: $max_len" \
44 "max start sector: $max_start" > exp || fail=1
45 compare exp out || fail=1