- Add ':' as a separator between the OpenFirmware device space and

the file path. Commonly used on Macs e.g. "hd:9".
- Update the ofw_setcurrdev routine to match libstand setenv prototype

Not objected to by: sparc64
This commit is contained in:
Peter Grehan 2003-12-21 12:38:25 +00:00
parent bca2f486f0
commit e49e14200a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123703
2 changed files with 4 additions and 3 deletions

View File

@ -47,7 +47,8 @@ ofw_getdev(void **vdev, const char *devspec, const char **path)
* device, go with the current device.
*/
if ((devspec == NULL) ||
(strchr(devspec, '@') == NULL)) {
((strchr(devspec, '@') == NULL) &&
(strchr(devspec, ':') == NULL))) {
if (((rv = ofw_parsedev(dev, getenv("currdev"), NULL)) == 0) &&
(path != NULL))
@ -112,7 +113,7 @@ ofw_parsedev(struct ofw_devdesc **dev, const char *devspec, const char **path)
}
int
ofw_setcurrdev(struct env_var *ev, int flags, void *value)
ofw_setcurrdev(struct env_var *ev, int flags, const void *value)
{
struct ofw_devdesc *ncurr;
int rv;

View File

@ -36,7 +36,7 @@ struct ofw_devdesc {
};
extern int ofw_getdev(void **vdev, const char *devspec, const char **path);
extern int ofw_setcurrdev(struct env_var *ev, int flags, void *value);
extern ev_sethook_t ofw_setcurrdev;
extern struct devsw ofwdisk;
extern struct netif_driver ofwnet;