Hi,
This the new version of the patch adding grub-probe (and grub-setup)
support for NetBSD. The main changes are:
- in function grub_util_biosdisk_get_grub_dev(), merge of the new
NetBSD code with the original Linux code.
- re-enabled disk size detection for floppy. This is done as for t
On Sat, Jan 02, 2010 at 12:35:44PM +0100, Grégoire Sutre wrote:
>> Can you avoid code duplication here? Something like:
>>
>> #ifdef __NetBSD__
>> const char *template = "%s/r%s";
>> #else
>> const char *template = "%s/%s";
>> #endif
>
> Indeed, it's better. But we also need a variable for th
Vladimir 'φ-coder/phcoder' Serbinenko wrote:
One byte is cheap. No need for gimmicks just to save one byte. You can
always allocate with +3
Ok :-)
Grégoire
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-d
Grégoire Sutre wrote:
> Robert Millan wrote:
>> On Tue, Dec 29, 2009 at 02:31:46AM +0100, Grégoire Sutre wrote:
>>> +#if defined(__NetBSD__)
>>> + /* Convert this block device to its character (raw) device */
>>> + res = xmalloc (strlen (cwd) + strlen (ent->d_name) + 3);
>>> + sprint
Robert Millan wrote:
On Tue, Dec 29, 2009 at 02:31:46AM +0100, Grégoire Sutre wrote:
+#if defined(__NetBSD__)
+ /* Convert this block device to its character (raw) device */
+ res = xmalloc (strlen (cwd) + strlen (ent->d_name) + 3);
+ sprintf (res, "%s/r%s", cwd, ent->d_n
On Tue, Dec 29, 2009 at 02:31:46AM +0100, Grégoire Sutre wrote:
> +#if defined(__NetBSD__)
> + /* Convert this block device to its character (raw) device */
> + res = xmalloc (strlen (cwd) + strlen (ent->d_name) + 3);
> + sprintf (res, "%s/r%s", cwd, ent->d_name);
> +#else
>
Hi,
Here is a new version of the patch (the change log remains the same as
in the original email). The new version does not attempt to read from a
floppy device in grub_util_biosdisk_open. Indeed, on NetBSD, reading
from the floppy device (e.g. cat /dev/fd0a) takes a _long_ time to abort
wh
Hi,
I finished adding NetBSD specific code for grub-probe. A patch and a
changelog entry are attached. A few notes:
- devices are required to be character (raw) devices. In NetBSD, those
are of the form "/dev/r[wsc]d[0-9]+[a-z]" for hard disk drives and
CD-ROM drives, as far as I know.
-