Re: Regarding writing into raw file

2011-01-25 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 01/25/2011 02:01 PM, Gnanasekar Loganathan wrote: > Actually i'm writing to the first 512 bytes only. > You're not. You're writing to a sector well within the partition (the one at part_start and not the one at 0) > The value of SECTOR_SIZE is 512. > > Also i noticed that in loadenv.c, while

Re: Regarding writing into raw file

2011-01-25 Thread Gnanasekar Loganathan
Actually i'm writing to the first 512 bytes only. The value of SECTOR_SIZE is 512. Also i noticed that in loadenv.c, while reading the from grubenv file, read_hook is called. Why the read_hook is not called in this scenario? 2011/1/25 Vladimir 'φ-coder/phcoder' Serbinenko : > On 01/25/2011 11:34

Re: Regarding writing into raw file

2011-01-25 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 01/25/2011 11:34 AM, Gnanasekar Loganathan wrote: > if(grub_disk_write(disk, part_start, 0, SECTOR_SIZE, nvbuf) ) { > Writes as well as reads are to partition, not to entire disk erand so are the sector numbers -- Regards Vladimir 'φ-coder/phcoder' Serbinenko signature.asc Descripti

Re: Regarding writing into raw file

2011-01-25 Thread Gnanasekar Loganathan
Hi, Attached my c file, kindly review and let me know if any mistakes that i did in this file. Thanks, Gnana 2011/1/25 Vladimir 'φ-coder/phcoder' Serbinenko : > On 01/25/2011 07:02 AM, Gnanasekar Loganathan wrote: >> Hi Vladimir, >> >> I'm using the grub_disk_write function to write the data. >>

Re: Regarding writing into raw file

2011-01-24 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 01/25/2011 07:02 AM, Gnanasekar Loganathan wrote: > Hi Vladimir, > > I'm using the grub_disk_write function to write the data. > This should work (as long as used right, of course). > My goal is to erase all the data in that particular partition. > > GRUB isn't the right place to write so

Re: Regarding writing into raw file

2011-01-24 Thread Gnanasekar Loganathan
Hi Vladimir, I'm using the grub_disk_write function to write the data. My goal is to erase all the data in that particular partition. Booted os will do read and write operation on that partition. -Gnana 2011/1/24 Vladimir 'φ-coder/phcoder' Serbinenko : > On 01/24/2011 03:49 PM, Gnanasekar Logan

Re: Regarding writing into raw file

2011-01-24 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 01/24/2011 03:49 PM, Gnanasekar Loganathan wrote: > Hi All, > > I try to opening a file called "(hd0,2,a)+10" from GRUB. > This is old syntax. New one is (hd0,netbsd1) > For me open got success and able read some of the data. > But i'm not able to write some data into the file, getting "out o