/*
interface.c -- parted binding glue to libext2resize
Copyright (C) 1998-2000, 2007-2010 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/>.
*/
/* VERSION: libext2resize 1.1.6 (by Lennert)
* merged 1.1.11 changes (by Andrew)
*/
#include <config.h>
#include "ext2.h"
#include "parted_io.h"
static PedGeometry*
{
void *sb_v;
return NULL;
int is_ext3 = 0;
int is_ext4 = 0;
& EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0;
if (is_ext3) {
|| (EXT2_SUPER_FEATURE_RO_COMPAT (*sb)
|| (EXT2_SUPER_FEATURE_RO_COMPAT (*sb)
|| (EXT2_SUPER_FEATURE_INCOMPAT (*sb)
|| (EXT2_SUPER_FEATURE_INCOMPAT (*sb)
|| (EXT2_SUPER_FEATURE_INCOMPAT (*sb)
if (is_ext4)
is_ext3 = 0;
}
return NULL;
return NULL;
return NULL;
- group_blocks * group_nr
if (start < 0)
return NULL;
return _ext2_generic_probe (&probe_geom,
} else {
}
}
else {
}
return NULL;
}
static PedGeometry*
{
}
static PedGeometry*
{
}
static PedGeometry*
{
}
#ifndef DISCOVER_ONLY
static int
{
void *sb_v;
int ok = 0;
/* Clobber only if there's a matching magic number. */
ok = 1;
} else {
}
}
return ok;
}
static PedFileSystem*
{
if (!handle) goto error_free_fs;
if (!fs_info) goto error_free_handle;
fs_info->opt_verbose = 0;
return fs;
return NULL;
}
static PedFileSystem*
{
if (!handle) goto error_free_fs;
if (!fs_info) goto error_free_handle;
fs_info->opt_verbose = 0;
return fs;
return NULL;
}
static int
{
return 1;
}
static int
{
_("The ext2 file system passed a basic check. For a more "
"comprehensive check, use the e2fsck program."));
return 1;
}
static int
{
struct ext2_fs* f;
{
_("Sorry, can't move the start of ext2 partitions yet!"));
return 0;
}
/* ensure that the geometry contains the new and old geometry */
timer))
goto error;
} else {
timer))
goto error;
}
return 1;
return 0;
}
static PedConstraint*
{
return NULL;
return ped_constraint_new (
}
static PedConstraint*
{
return NULL;
return NULL;
return NULL;
- EXT2_SUPER_FREE_BLOCKS_COUNT(f->sb))
}
#endif /* !DISCOVER_ONLY */
.probe = _ext2_probe,
#ifndef DISCOVER_ONLY
.clobber = _ext2_clobber,
.open = _ext2_open,
.create = _ext2_create,
.close = _ext2_close,
.check = _ext2_check,
.resize = _ext2_resize,
#else /* !DISCOVER_ONLY */
#endif /* !DISCOVER_ONLY */
};
.probe = _ext3_probe,
#ifndef DISCOVER_ONLY
.clobber = _ext2_clobber,
.open = _ext2_open,
.close = _ext2_close,
.check = _ext2_check,
.resize = _ext2_resize,
#else /* !DISCOVER_ONLY */
#endif /* !DISCOVER_ONLY */
};
.probe = _ext4_probe,
};
.name = "ext2",
};
.name = "ext3",
};
.name = "ext4",
};
void ped_file_system_ext2_init ()
{
}
void ped_file_system_ext2_done ()
{
}