]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fix a stupid bug in write_to_partition.
authorokuji <okuji@localhost>
Sat, 7 Oct 2000 07:25:25 +0000 (07:25 +0000)
committerokuji <okuji@localhost>
Sat, 7 Oct 2000 07:25:25 +0000 (07:25 +0000)
ChangeLog
lib/device.c
stage2/builtins.c

index d6f146aba8409cfa88562e59d1679f844d49d6a2..7af6f5bdd24c67d4ec0dbe721c6d2a1aa42e17a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-07  OKUJI Yoshinori  <okuji@gnu.org>
+
+       * lib/device.c [__linux__] (write_to_partition): Open DEV with
+       O_RDWR instead of O_ORONLY.
+       
 2000-10-06  Alessandro Rubini  <rubini@gnu.org>
 
        * docs/user-ref.texi (Commands): Added missing commands and
index 84eafcf3378a2032de3d9ddda9aabfe8a233f655..62d6085bb40f54892e6c43e75a6065061a9156e5 100644 (file)
@@ -550,7 +550,7 @@ write_to_partition (char **map, int drive, int partition,
   sprintf (dev, "%s%d", map[drive], ((partition >> 16) & 0xFF) + 1);
   
   /* Open the partition.  */
-  fd = open (dev, O_RDONLY);
+  fd = open (dev, O_RDWR);
   if (fd < 0)
     {
       errnum = ERR_NO_PART;
index a375e604ac31d204a2c308b5d0176ffe1bcc642a..fb58bb0d692b33692f89174e10d2afbc6605aa28 100644 (file)
@@ -2018,7 +2018,7 @@ install_func (char *arg, int flags)
 #endif /* GRUB_UTIL && __linux__ */
     {
       grub_memmove ((char *) SCRATCHADDR, stage1_buffer, SECTOR_SIZE);
-      if (biosdisk (BIOSDISK_WRITE,    dest_drive, &dest_geom,
+      if (biosdisk (BIOSDISK_WRITE, dest_drive, &dest_geom,
                    dest_sector, 1, SCRATCHSEG))
        {
          errnum = ERR_WRITE;