Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EhJjg-0007B7-MP for mharc-grub-devel@gnu.org; Tue, 29 Nov 2005 23:38:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhJje-0007B0-Q0 for grub-devel@gnu.org; Tue, 29 Nov 2005 23:38:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhJjc-0007Ad-KW for grub-devel@gnu.org; Tue, 29 Nov 2005 23:38:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhJjc-0007AZ-F1 for grub-devel@gnu.org; Tue, 29 Nov 2005 23:38:24 -0500 Received: from [209.86.89.64] (helo=smtpauth04.mail.atl.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EhJjc-0001zQ-Iz for grub-devel@gnu.org; Tue, 29 Nov 2005 23:38:24 -0500 Received: from [63.246.184.80] (helo=[192.168.0.101]) by smtpauth04.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1EhJja-0002Js-9l for grub-devel@gnu.org; Tue, 29 Nov 2005 23:38:22 -0500 Mime-Version: 1.0 (Apple Message framework v623) In-Reply-To: <20051129230521.097f014b@synapse> References: <436CBF00.1060304@yahoo.fr> <200511051928.49549.okuji@enbug.org> <436D1420.80507@yahoo.fr> <20051129230521.097f014b@synapse> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <1607100d6bd1c97c11fa556b4e64ff29@penguinppc.org> Content-Transfer-Encoding: 7bit From: Hollis Blanchard Date: Tue, 29 Nov 2005 22:38:23 -0600 To: The development of GRUB 2 X-Mailer: Apple Mail (2.623) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec790d9db994bd20466dc1ad25c7baf6a82f350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 Subject: Re: play.c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2005 04:38:26 -0000 On Nov 29, 2005, at 4:05 PM, Vincent Pelletier wrote: > + status = inb (SPEAKER); > + outb (SPEAKER, status & ~(SPEAKER_TMR2 | SPEAKER_DATA)); You changed the style here... > + status = inb (SPEAKER) | SPEAKER_TMR2 | SPEAKER_DATA; > + outb (SPEAKER, status); ... but not here. > + grub_dprintf ("play","tempo = %d\n", tempo); ... > + grub_dprintf ("play","pitch = %d, duration = %d\n", buf.pitch, > + buf.duration); Space after the first comma, please. > + to = grub_get_rtc () + 120 * buf.duration / tempo; What is 120? Should be a #define, and probably commented. > + file = grub_file_open (args[0]); > + if (! file) > + return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found"); > + > + if (grub_file_read (file, (void *) &tempo, sizeof(tempo)) != > sizeof(tempo)) > + return grub_error (GRUB_ERR_FILE_READ_ERROR, > + "file doesn't even contains a full tempo > record"); You must grub_file_close(file) before returning here. Other than these minor things, looks good to me. -Hollis