All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] Refuse to install on XFS destroying its superblock
Date: Fri, 16 Oct 2009 12:56:14 +0200	[thread overview]
Message-ID: <4AD8514E.2040304@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 108 bytes --]


-- 
Regards
Vladimir 'phcoder' Serbinenko
Personal git repository: http://repo.or.cz/w/grub2/phcoder.git 


[-- Attachment #2: xfs.diff --]
[-- Type: text/x-patch, Size: 929 bytes --]

diff --git a/ChangeLog b/ChangeLog
index b0864a9..a67fdfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-16  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	* util/i386/pc/grub-setup.c (setup): Refuse to overwrite XFS superblock.
+
 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
 	* 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

             reply	other threads:[~2009-10-16 10:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 10:56 Vladimir 'phcoder' Serbinenko [this message]
2009-10-16 14:03 ` [PATCH] Refuse to install on XFS destroying its superblock Vladimir 'phcoder' Serbinenko
2009-10-16 16:01   ` Jordi Mallach
2009-10-16 18:38     ` Robert Millan
2009-10-16 20:09       ` Vladimir 'phcoder' Serbinenko
2009-10-16 20:52         ` Robert Millan
2009-10-16 21:08           ` Vladimir 'phcoder' Serbinenko
2009-10-16 21:53             ` Robert Millan
2009-10-16 22:18               ` Vladimir 'phcoder' Serbinenko
2009-10-17 11:25                 ` Robert Millan
2009-10-17 11:43                   ` Vladimir 'phcoder' Serbinenko
2009-10-17 12:00                     ` Robert Millan
2009-10-17 12:06                       ` Felix Zielcke
2009-10-17 12:09                       ` Vladimir 'phcoder' Serbinenko
2009-10-17 16:12                         ` richardvoigt
2009-10-18 16:44                           ` Vladimir 'phcoder' Serbinenko
2009-10-18 15:46                         ` Robert Millan
2009-10-18 16:30                           ` Vladimir 'phcoder' Serbinenko
2009-10-20 10:18                             ` Robert Millan
2009-10-20 10:51                               ` Vladimir 'phcoder' Serbinenko
2009-10-25  0:01                                 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD8514E.2040304@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.