From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Phikk-0003jT-PY for mharc-grub-devel@gnu.org; Tue, 25 Jan 2011 08:16:10 -0500 Received: from [140.186.70.92] (port=46084 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Phiki-0003j7-2o for grub-devel@gnu.org; Tue, 25 Jan 2011 08:16:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Phikh-0005tC-1e for grub-devel@gnu.org; Tue, 25 Jan 2011 08:16:08 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:53182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Phikg-0005t0-Tb for grub-devel@gnu.org; Tue, 25 Jan 2011 08:16:07 -0500 Received: by wyj26 with SMTP id 26so5890473wyj.0 for ; Tue, 25 Jan 2011 05:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type; bh=8MCiPmHb/ErZEaIG6REjwk5UFCMO1A/wOKfP+hVDJjA=; b=L1cnhW6lRbUTvhyVKtA4FoF6kpBPf/Dg3aLX0UNhAokVkPPIS81u6IZZclEb2A2PpW 137VmDekvnIOK51qPtzWVgeVavNwfkYkbpiywEN4wEfD6t06USiL77enb9GYasXlV6SC QCziebziHZdXDhqBKGluGC0ZDBCvIUy5yDhAU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=oq/6yel6NNdsgQvZXv+Q4cM/Jg7UOR2vDuqONfXOiFWfbohHMhon8H4tfsY1PWXiL0 09WAG2Bg74SEUFqbz2xzlL8mtUSIRQoCxmD8uXxL4M3w4yWMlHVr8ExUdJcUNgQH+KiP rYfPW8OYUK2IV3f48MDS9rPa2tn38h3pdi3Ms= Received: by 10.216.191.160 with SMTP id g32mr3944347wen.18.1295961365562; Tue, 25 Jan 2011 05:16:05 -0800 (PST) Received: from debian.x201.phnet (gprs25.swisscom-mobile.ch [193.247.250.25]) by mx.google.com with ESMTPS id j49sm7154351wer.14.2011.01.25.05.16.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 05:16:04 -0800 (PST) Message-ID: <4D3ECD09.7000407@gmail.com> Date: Tue, 25 Jan 2011 14:15:53 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: grub-devel@gnu.org References: <4D3D9345.7000204@gmail.com> <4D3E766D.9050307@gmail.com> <4D3EB711.2070906@gmail.com> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig09DEA61DAFDA32E8D39022E0" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Regarding writing into raw file X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2011 13:16:09 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig09DEA61DAFDA32E8D39022E0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/25/2011 02:01 PM, Gnanasekar Loganathan wrote: > Actually i'm writing to the first 512 bytes only. > =20 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 reading the from grubenv file, > read_hook is called. Why the read_hook is not called in this scenario? > =20 read_hook doesn't work with blocklists. You overengineer the stuff. Have a look at e.g. gptsync. > 2011/1/25 Vladimir '=CF=86-coder/phcoder' Serbinenko : > =20 >> On 01/25/2011 11:34 AM, Gnanasekar Loganathan wrote: >> =20 >>> if(grub_disk_write(disk, part_start, 0, SECTOR_SIZE, nvbuf) ) { >>> >>> =20 >> Writes as well as reads are to partition, not to entire disk erand so >> are the sector numbers >> >> -- >> Regards >> Vladimir '=CF=86-coder/phcoder' Serbinenko >> >> >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> http://lists.gnu.org/mailman/listinfo/grub-devel >> >> >> =20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig09DEA61DAFDA32E8D39022E0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk0+zQkACgkQNak7dOguQgmuWAD+Ki7q6CL37IO4Jw9qc562dOFI nxafwa6R4mus1guXlUcBAL9ZBhrIkaurTvDdT9DLJSMQAlwfSVBnXytkxg6jAHfk =QUW1 -----END PGP SIGNATURE----- --------------enig09DEA61DAFDA32E8D39022E0--