#include "ext2fs/ext2fs.h"
#include "uuid/uuid.h"
#include "e2p/e2p.h"
-#include "ext2fs/jfs_user.h"
+#include "ext2fs/kernel-jbd.h"
#include "util.h"
#include "blkid/blkid.h"
/* Helper function for remove_journal_inode */
static int release_blocks_proc(ext2_filsys fs, blk_t *blocknr,
- int blockcnt EXT2FS_ATTR((unused)),
+ int blockcnt EXT2FS_ATTR((unused)),
void *private EXT2FS_ATTR((unused)))
{
blk_t block;
ino_t ino = fs->super->s_journal_inum;
char *msg = "to read";
char *s = "journal inode";
-
+
retval = ext2fs_read_inode(fs, ino, &inode);
- if (retval)
+ if (retval)
goto REMOVE_JOURNAL_INODE_ERROR;
if (ino == EXT2_JOURNAL_INO) {
retval = ext2fs_read_bitmaps(fs);
return;
}
-/*
+/*
* Busybox stuff
*/
static char * x_blkid_get_devname(const char *token)
{
char * dev_name;
-
+
if (!(dev_name = blkid_get_devname(NULL, token, NULL)))
bb_error_msg_and_die("Unable to resolve '%s'", token);
return dev_name;
open_flag = EXT2_FLAG_RW | EXT2_FLAG_JOURNAL_DEV_OK;
L_flag = 1;
new_label = argv[2];
- } else
+ } else
print_label++;
}
#else
-#define parse_e2label_options(x,y)
+#define parse_e2label_options(x,y)
#endif
static time_t parse_time(char *str)
mntopts_cmd = optarg;
open_flag = EXT2_FLAG_RW;
break;
-
+
case 'O':
if (features_cmd) {
bb_error_msg_and_die("-O may only be specified once");
}
#ifdef CONFIG_FINDFS
-static attribute_noreturn void do_findfs(int argc, char **argv)
+static ATTRIBUTE_NORETURN void do_findfs(int argc, char **argv)
{
if ((argc != 2) ||
(strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5)))
#define do_findfs(x, y)
#endif
-static void clean_up(void)
+static void tune2fs_clean_up(void)
{
if (ENABLE_FEATURE_CLEAN_UP && device_name) free(device_name);
if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device);
io_manager io_ptr;
if (ENABLE_FEATURE_CLEAN_UP)
- atexit(clean_up);
-
+ atexit(tune2fs_clean_up);
+
if (ENABLE_FINDFS && (bb_applet_name[0] == 'f')) /* findfs */
do_findfs(argc, argv); /* no return */
else if (ENABLE_E2LABEL && (bb_applet_name[0] == 'e')) /* e2label */
parse_tune2fs_options(argc, argv); /* tune2fs */
io_ptr = unix_io_manager;
- retval = ext2fs_open2(device_name, io_options, open_flag,
+ retval = ext2fs_open2(device_name, io_options, open_flag,
0, 0, io_ptr, &fs);
if (retval)
bb_error_msg_and_die("No valid superblock on %s", device_name);