Merge pull request #14 from coreos/gnu

Merge upstream GRUB changes
This commit is contained in:
Michael Marineau 2015-08-13 13:32:56 -07:00
commit 91391dc52b
86 changed files with 1935 additions and 1034 deletions

View file

@ -40,6 +40,10 @@ case x"$fs" in
MINLOGSECSIZE=9
# OS LIMITATION: GNU/Linux doesn't accept > 4096
MAXLOGSECSIZE=12;;
xxfs_crc)
MINLOGSECSIZE=9
# OS LIMITATION: GNU/Linux doesn't accept > 1024
MAXLOGSECSIZE=10;;
xzfs*)
# OS LIMITATION: zfs-fuse hangs when creating zpool with sectors <=256B.
MINLOGSECSIZE=9
@ -142,6 +146,10 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
MINBLKSIZE=$SECSIZE
# OS Limitation: GNU/Linux doesn't accept > 4096
MAXBLKSIZE=4096;;
xxfs_crc)
# OS Limitation: GNU/Linux doesn't accept != 1024
MINBLKSIZE=1024
MAXBLKSIZE=1024;;
xudf)
MINBLKSIZE=1024
MAXBLKSIZE=4096;;
@ -289,7 +297,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
x"ufs1" | x"ufs1_sun" | x"ufs2")
FSLABEL="grubtest""ieurrucnenreeiurueurewf";;
# FS LIMITATION: XFS label is at most 12 UTF-8 characters
x"xfs")
x"xfs"|x"xfs_crc")
FSLABEL="géт 😁к";;
# FS LIMITATION: FAT labels limited to 11 characters, no international characters or lowercase
x"vfat"* | xmsdos*)
@ -467,7 +475,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
case x"$fs" in
# FIXME: Not sure about BtrFS, NTFS, JFS, AFS, UDF and SFS. Check it.
# FS LIMITATION: as far as I know those FS don't store their last modification date.
x"jfs_caseins" | x"jfs" | x"xfs"| x"btrfs"* | x"reiserfs_old" | x"reiserfs" \
x"jfs_caseins" | x"jfs" | x"xfs" | x"xfs_crc" | x"btrfs"* | x"reiserfs_old" | x"reiserfs" \
| x"bfs" | x"afs" \
| x"tarfs" | x"cpio_"* | x"minix" | x"minix2" \
| x"minix3" | x"ntfs"* | x"udf" | x"sfs"*)
@ -760,7 +768,10 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
xext*)
MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
xxfs)
"mkfs.xfs" -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
"mkfs.xfs" -m crc=0 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
xxfs_crc)
MOUNTFS="xfs"
"mkfs.xfs" -m crc=1 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
*)
echo "Add appropriate mkfs command here"
exit 1
@ -1123,6 +1134,37 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
fi
fi
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -la "($GRUBDEVICE)/grub fs@/.");;
*)
LSROUT=$(run_grubfstest ls -- -la "($GRUBDEVICE)/.");;
esac
if echo "$LSROUT" | grep -F " $BASEFILE" | grep "$BLOCKCNT" > /dev/null; then
:
else
echo DOT IN ROOTDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
exit 1
fi
case x"$fs" in
x"zfs"*)
;;
*)
LSROUT=$(run_grubfstest ls -- -la "($GRUBDEVICE)/..");
if echo "$LSROUT" | grep -F " $BASEFILE" | grep "$BLOCKCNT" > /dev/null; then
:
else
echo DOTDOT IN ROOTDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
exit 1
fi
;;
esac
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/grub fs@/////sdir");;
@ -1153,6 +1195,36 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
exit 1
fi
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/grub fs@/sdir/.");;
*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/sdir/.");;
esac
if echo "$LSROUT" | grep -F " 2.img" | grep $BLOCKCNT > /dev/null; then
:
else
echo DOT IN SUBDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/$OSDIR/sdir"
exit 1
fi
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/grub fs@/sdir/../sdir");;
*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/sdir/../sdir");;
esac
if echo "$LSROUT" | grep -F " 2.img" | grep $BLOCKCNT > /dev/null; then
:
else
echo DOTDOT IN SUBDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/$OSDIR/ssdir"
exit 1
fi
LSOUT=`run_grubfstest ls -- -l "($GRUBDEVICE)"`
if [ x"$NOFSLABEL" = xy ]; then
: