From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MykTy-0001rp-B8 for mharc-grub-devel@gnu.org; Fri, 16 Oct 2009 06:56:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MykTw-0001qI-1H for grub-devel@gnu.org; Fri, 16 Oct 2009 06:56:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MykTr-0001mW-4V for grub-devel@gnu.org; Fri, 16 Oct 2009 06:56:23 -0400 Received: from [199.232.76.173] (port=58186 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MykTr-0001mM-26 for grub-devel@gnu.org; Fri, 16 Oct 2009 06:56:19 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:62671) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MykTq-0003ne-Cb for grub-devel@gnu.org; Fri, 16 Oct 2009 06:56:18 -0400 Received: by fg-out-1718.google.com with SMTP id e21so196681fga.12 for ; Fri, 16 Oct 2009 03:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type; bh=mt6lAtf2Vrq+Z5o+t5adGcajW3C45tqXaDBmy3lCwu8=; b=XH0Q1P8t2dsQcmYX+vVLvyoM60dEvNpJf8igEJoz6xihwFGyaDmOearFQXFVmFPQrY runaMpzJMFfWQzaVxSGcjI0bCev+XN15ExiixycEJcYYusSdo8sC8TD1Y+D4Yi9vuKus 42rCAjiwU97OF9QelJ9RL43wuAW0jN35dNUrY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=ZLnNJpbhfCJHZ4i/XEt00h/q978qUaZasFDthIowIzWhD65Gn1OFkAQ7yrXbypHE0H gnl329gklipvqvmwzmGvWGqpSUU0JW2Bo6GD7d4w3x53DA62KrYkR7nPRDTxsbLIG76x DtLsgj1VEA4VLhakrNsJ3c8iE7Z2JqPR6ocMo= Received: by 10.86.249.22 with SMTP id w22mr1104194fgh.1.1255690576606; Fri, 16 Oct 2009 03:56:16 -0700 (PDT) Received: from debian.bg45.phnet (hg-public-dock-129-dhcp.ethz.ch [82.130.80.129]) by mx.google.com with ESMTPS id e3sm5045178fga.9.2009.10.16.03.56.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Oct 2009 03:56:15 -0700 (PDT) Message-ID: <4AD8514E.2040304@gmail.com> Date: Fri, 16 Oct 2009 12:56:14 +0200 From: Vladimir 'phcoder' Serbinenko User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="------------030402060409060406090307" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [PATCH] Refuse to install on XFS destroying its superblock X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2009 10:56:24 -0000 This is a multi-part message in MIME format. --------------030402060409060406090307 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git --------------030402060409060406090307 Content-Type: text/x-patch; name="xfs.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xfs.diff" diff --git a/ChangeLog b/ChangeLog index b0864a9..a67fdfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-10-16 Vladimir Serbinenko + + * util/i386/pc/grub-setup.c (setup): Refuse to overwrite XFS superblock. + 2009-10-15 Vladimir Serbinenko * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image. diff --git a/util/i386/pc/grub-setup.c b/util/i386/pc/grub-setup.c index ccfbd1d..5181e58 100644 --- a/util/i386/pc/grub-setup.c +++ b/util/i386/pc/grub-setup.c @@ -205,6 +205,9 @@ setup (const char *dir, boot_img = grub_util_read_image (boot_path); free (boot_path); + if (memcmp (boot_img, "XFSB", 4) == 0) + grub_util_error ("Can't install on XFS."); + /* Set the addresses of variables in the boot image. */ boot_drive = (grub_uint8_t *) (boot_img + GRUB_BOOT_MACHINE_BOOT_DRIVE); kernel_sector = (grub_disk_addr_t *) (boot_img --------------030402060409060406090307--