ufs.c revision 7e7bd3dccbfe8f79e25e5c1554b5bc3a9aaca321
/*
libparted - a library for manipulating disk partitions
Copyright (C) 2001, 2007 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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
Contributor: Ben Collins <bcollins@debian.org>
*/
#include <config.h>
#if ENABLE_NLS
# include <libintl.h>
#else
#endif /* ENABLE_NLS */
#include <unistd.h>
#include <string.h>
/* taken from ufs_fs.h in Linux */
#define UFS_MAXNAMLEN 255
#define UFS_MAXMNTLEN 512
#define UFS_MAXCSBUFS 31
#define UFS_LINK_MAX 32000
#define UFS_MAGIC 0x00011954
#define UFS_MAGIC_LFN 0x00095014
#define UFS_MAGIC_FEA 0x00195612
#define UFS_MAGIC_4GB 0x05231994
struct ufs_csum {
};
struct ufs_super_block {
/* these are configuration parameters */
/* these fields can be computed from the others */
/* these are configuration parameters */
/* these fields can be computed from the others */
/* yet another configuration parameter */
/* these fields are derived from the hardware */
union {
struct {
} fs_sun;
struct {
} fs_sunx86;
} fs_u1;
/* a unique id for this file system (currently unused and unmaintained) */
/* In 4.3 Tahoe this space is used by fs_headswitch and fs_trkseek */
/* Neither of those fields is used in the Tahoe code right now but */
/* there could be problems if they are. */
/* sizes determined by number of cylinder groups and their sizes */
/* these fields are derived from the hardware */
/* this comes from the disk driver partitioning */
/* these fields can be computed from the others */
/* this data must be re-computed after crashes */
/* these fields are cleared at mount time */
/* these fields retain the current block allocation info */
union {
struct {
} fs_sun;
struct {
} fs_sunx86;
struct {
} fs_44;
} fs_u2;
};
static PedGeometry*
{
struct ufs_super_block *sb;
return 0;
return 0;
}
}
return NULL;
}
static PedGeometry*
{
struct ufs_super_block *sb;
return 0;
return 0;
/* Try sane bytesex */
case UFS_MAGIC_LFN:
case UFS_MAGIC_FEA:
case UFS_MAGIC_4GB:
}
/* Try perverted bytesex */
case UFS_MAGIC_LFN:
case UFS_MAGIC_FEA:
case UFS_MAGIC_4GB:
}
return NULL;
}
#ifndef DISCOVER_ONLY
static int
{
char buf[1536];
return 0;
}
#endif /* !DISCOVER_ONLY */
static PedFileSystemOps ufs_ops_sun = {
.probe = ufs_probe_sun,
#ifndef DISCOVER_ONLY
.clobber = ufs_clobber,
#else
#endif
};
static PedFileSystemOps ufs_ops_hp = {
.probe = ufs_probe_hp,
#ifndef DISCOVER_ONLY
.clobber = ufs_clobber,
#else
#endif
};
static PedFileSystemType ufs_type_sun = {
.ops = &ufs_ops_sun,
.name = "sun-ufs",
};
static PedFileSystemType ufs_type_hp = {
.ops = &ufs_ops_hp,
.name = "hp-ufs",
};
void
{
}
void
{
}