fix a stupid bug in write_to_partition.
This commit is contained in:
parent
5b956a8ac8
commit
324e93a919
3 changed files with 7 additions and 2 deletions
|
@ -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>
|
2000-10-06 Alessandro Rubini <rubini@gnu.org>
|
||||||
|
|
||||||
* docs/user-ref.texi (Commands): Added missing commands and
|
* docs/user-ref.texi (Commands): Added missing commands and
|
||||||
|
|
|
@ -550,7 +550,7 @@ write_to_partition (char **map, int drive, int partition,
|
||||||
sprintf (dev, "%s%d", map[drive], ((partition >> 16) & 0xFF) + 1);
|
sprintf (dev, "%s%d", map[drive], ((partition >> 16) & 0xFF) + 1);
|
||||||
|
|
||||||
/* Open the partition. */
|
/* Open the partition. */
|
||||||
fd = open (dev, O_RDONLY);
|
fd = open (dev, O_RDWR);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
errnum = ERR_NO_PART;
|
errnum = ERR_NO_PART;
|
||||||
|
|
|
@ -2018,7 +2018,7 @@ install_func (char *arg, int flags)
|
||||||
#endif /* GRUB_UTIL && __linux__ */
|
#endif /* GRUB_UTIL && __linux__ */
|
||||||
{
|
{
|
||||||
grub_memmove ((char *) SCRATCHADDR, stage1_buffer, SECTOR_SIZE);
|
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))
|
dest_sector, 1, SCRATCHSEG))
|
||||||
{
|
{
|
||||||
errnum = ERR_WRITE;
|
errnum = ERR_WRITE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue