pygrub: cope better with big files in the guest.
authorM A Young <m.a.young@durham.ac.uk>
Wed, 4 Jul 2012 14:46:14 +0000 (15:46 +0100)
committerM A Young <m.a.young@durham.ac.uk>
Wed, 4 Jul 2012 14:46:14 +0000 (15:46 +0100)
commite7e8937625f5a62f8f15a0dcf98546113446675e
treefffa0bc581cfc7644fce9b31028626d23f0ace90
parent88fccdd11ca0c2df915d7d56ab78ea70d4b60e52
pygrub: cope better with big files in the guest.

Only read the first megabyte of a configuration file (grub etc.) and read the
kernel and ramdisk files from the guest in one megabyte pieces so pygrub
doesn't use a lot of memory if the files are large.  With --not-really option
check that the chosen kernel and ramdisk files exist.  If there are problems
writing the copy of the kernel or ramdisk, delete the copied files and exit in
case they have filled the filesystem.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Acked-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/pygrub/src/pygrub