[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check for device type (block/character) in grub-setup?

From: Grégoire Sutre
Subject: Re: Check for device type (block/character) in grub-setup?
Date: Thu, 07 Jan 2010 18:31:02 +0100
User-agent: Thunderbird (X11/20091027)

Robert Millan wrote:
On Sun, Jan 03, 2010 at 03:54:49AM +0100, Grégoire Sutre wrote:

I'm wondering why there is no check for device type (block/character) in grub-setup.c whereas the function probe() in grub-probe.c exits with error if the device is not of the expected type. Shouldn't there be a similar check in grub-setup?


I guess that a similar behavior could be observed on FreeBSD, but I can't actually test this.

Please make the code generic if possible (i.e. accept both character and
block devices).

I don't understand what you mean here. I assumed that it's better to use character devices when accessing disks in GRUB utils, isn't it so? Moreover, at least on NetBSD, when a block device is mounted, it cannot be opened (device busy), and this would be a problem with grub-probe.

However, from a user view-point, it could be nice on NetBSD to accept stripped device names (e.g. only `wd0d' or even `wd0') and automatically get the associated device file (with opendisk(3)). This is what system tools do, e.g. `disklabel wd0' or `fdisk wd0' actually opens `/dev/rwd0d' (on i386).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]