All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Refuse to install on XFS destroying its superblock
@ 2009-10-16 10:56 Vladimir 'phcoder' Serbinenko
  2009-10-16 14:03 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 21+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-10-16 10:56 UTC (permalink / raw)
  To: The development of GRUB 2

[-- 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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-10-25  0:01 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 10:56 [PATCH] Refuse to install on XFS destroying its superblock Vladimir 'phcoder' Serbinenko
2009-10-16 14:03 ` 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

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.