/* ofdisk.c - Open Firmware disk access. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2004,2006,2007,2008,2009,2011 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
static int lnum = 0;
struct arcdisk_hash_ent
{
char *devpath;
int num;
};
static int
{
int hash = 0;
while (*devpath)
}
static struct arcdisk_hash_ent *
{
while (p)
{
break;
p = p->next;
}
return p;
}
static struct arcdisk_hash_ent *
{
struct arcdisk_hash_ent *p;
p = grub_malloc (sizeof (*p));
if (!p)
return NULL;
*head = p;
return p;
}
static int
{
{
return 0;
}
if (pull != GRUB_DISK_PULL_NONE)
return 0;
}
static grub_err_t
{
{
return GRUB_ERR_NONE;
}
if (last_path)
{
last_handle = 0;
}
{
}
if (!last_path)
return grub_errno;
return GRUB_ERR_NONE;
}
static grub_err_t
{
const char *iptr;
int state = 0;
if (!fullname)
return grub_errno;
if (state == 0)
{
if (!grub_isdigit (*iptr))
else
{
*optr++ = '(';
state = 1;
}
}
else
{
if (grub_isdigit (*iptr))
else
{
*optr++ = ')';
state = 0;
}
}
if (state)
*optr++ = ')';
if (!hash)
if (!hash)
return grub_errno;
if (err)
return err;
if (r)
{
int i;
for (i = 40; i >= 9; i--)
{
long unsigned count = 0;
grub_dprintf ("arcdisk",
continue;
0x200, &count))
continue;
if (count == 0)
continue;
res |= (1ULL << i);
}
grub_dprintf ("arcdisk",
}
else
return GRUB_ERR_NONE;
}
static void
{
}
static grub_err_t
{
unsigned long count;
if (err)
return err;
if (r)
{
pos, r);
}
while (totl)
{
}
return GRUB_ERR_NONE;
}
static grub_err_t
{
return GRUB_ERR_NOT_IMPLEMENTED_YET;
}
{
.name = "arcdisk",
.next = 0
};
void
grub_arcdisk_init (void)
{
}
void
grub_arcdisk_fini (void)
{
if (last_path)
{
last_handle = 0;
}
}