/*
*
* fsutils.c : filesystem utilities
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Licensed under the Academic Free License version 2.1
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <libintl.h>
#include <libhal.h>
#include "fsutils.h"
/*
* Separates dos notation device spec into device and drive number
*/
{
char *p;
return (B_FALSE);
}
return (B_FALSE);
}
p[0] = '\0';
p[0] = ':';
}
char *
{
char *s = NULL;
char *p;
return (p + sizeof ("/lofi/") - 1);
}
s = part;
s = slice;
} else {
s = disk;
}
return (s);
} else {
return ("");
}
}
{
}
{
}
struct part_find_s {
int num;
int count;
int systid;
int r_systid;
};
/*
* Walk partition tables and invoke a callback for each.
*/
static void
{
int ext = 0;
int systid;
int i;
break;
}
break;
}
for (i = 0; i < FD_NUMPART; i++) {
if (systid == 0) {
continue;
}
if (ext++ == 0) {
} else {
}
}
return;
}
}
}
}
static int
{
struct part_find_s *p = arg;
if (is_dos_drive(systid)) {
return (WALK_TERMINATE);
}
}
return (WALK_CONTINUE);
}
/*
* Given a dos drive number, return its relative sector number,
* number of sectors in partition and the system id.
*/
{
struct part_find_s p = { 0, 0, 0, 0, 0, 0 };
if (num > 0) {
return (B_TRUE);
}
}
return (B_FALSE);
}
static int
{
if (is_dos_drive(systid)) {
(*(int *)arg)++;
}
return (WALK_CONTINUE);
}
int
{
int count = 0;
return (count);
}
/*
*/
{
int i;
struct extpartition *p;
if (p->p_size == 0) {
continue;
}
return (B_FALSE);
}
if ((i > 0) &&
return (B_FALSE);
}
prev_start = p->p_start;
}
return (B_TRUE);
}