From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MynOj-0005hn-C8 for mharc-grub-devel@gnu.org; Fri, 16 Oct 2009 10:03:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MynOg-0005eN-Ev for grub-devel@gnu.org; Fri, 16 Oct 2009 10:03:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MynOb-0005YY-8p for grub-devel@gnu.org; Fri, 16 Oct 2009 10:03:09 -0400 Received: from [199.232.76.173] (port=42673 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MynOb-0005YK-33 for grub-devel@gnu.org; Fri, 16 Oct 2009 10:03:05 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:62894) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MynOa-0002Rx-Gw for grub-devel@gnu.org; Fri, 16 Oct 2009 10:03:04 -0400 Received: by fg-out-1718.google.com with SMTP id 16so920070fgg.12 for ; Fri, 16 Oct 2009 07:03:03 -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:references:in-reply-to :content-type; bh=EEqvm9Zl8wyS8PyaJ8pobX1+8TnHxp6ugZ38Y31RMho=; b=pp30xbtb4zJF059SzFPYbTBK3sQtJznRwkro8HXN3Yt9HizBMTxfrdVJK5vb5nG+6r VmxJbbHQk8BeTl49foxTARNZgNfJIO+eK+Wr+4mRNssxVnfysEb0IpIinP5+28mBVC+u MyH4GyRroiwsPGvaxcrKBlHL4gyGMhawFnzXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=Ys24C5Kp7R7YmhOSyS9bzICrV/5KjvdwOQuDG9VzXqxvd3C75aC8Hz/X0Y34/WpzJx a6l823diIiLqDrbUHDEYDZcEMHhl70vRWwn5n7Njy/LHu/yq0klBHFLpjP9CLswUDKza ExYkBBorPVqPvow/9TkEU4rzMvtVLeVK3oMnE= Received: by 10.86.170.4 with SMTP id s4mr1257259fge.9.1255701783327; Fri, 16 Oct 2009 07:03:03 -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 e3sm1758734fga.29.2009.10.16.07.03.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Oct 2009 07:03:02 -0700 (PDT) Message-ID: <4AD87D15.7060408@gmail.com> Date: Fri, 16 Oct 2009 16:03:01 +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 References: <4AD8514E.2040304@gmail.com> In-Reply-To: <4AD8514E.2040304@gmail.com> Content-Type: multipart/mixed; boundary="------------000709040307080003070208" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [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 14:03:10 -0000 This is a multi-part message in MIME format. --------------000709040307080003070208 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sorry, patch had a problem Vladimir 'phcoder' Serbinenko wrote: -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git --------------000709040307080003070208 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..b3f2736 100644 --- a/util/i386/pc/grub-setup.c +++ b/util/i386/pc/grub-setup.c @@ -251,6 +251,9 @@ setup (const char *dir, if (grub_disk_read (dest_dev->disk, 0, 0, GRUB_DISK_SECTOR_SIZE, tmp_img)) grub_util_error ("%s", grub_errmsg); + if (memcmp (tmp_img, "XFSB", 4) == 0) + grub_util_error ("Can't install on XFS."); + /* Copy the possible DOS BPB. */ memcpy (boot_img + GRUB_BOOT_MACHINE_BPB_START, tmp_img + GRUB_BOOT_MACHINE_BPB_START, --------------000709040307080003070208--