2005-01-05 Theodore Ts'o <tytso@mit.edu>
+ * e2initrd_helper.c: Fix gcc -Wall nits.
+
+ * e2image.c (main): Fix gcc -Wall nits. Fix e2image so that
+ e2image -I has an exit code of 0 when it is successful.
+
* mke2fs.c (PRS, parse_r_opts): Use parse_num_blocks() from the
e2p library to parse the number of blocks from the command
line.
output_meta_data_blocks(fs, fd);
}
-void install_image(char *device_name, char *image_fn, int raw_flag)
+static void install_image(char *device, char *image_fn, int raw_flag)
{
- int c;
errcode_t retval;
ext2_filsys fs;
int open_flag = EXT2_FLAG_IMAGE_FILE;
exit(1);
}
- retval = io_ptr->open(device_name, IO_FLAG_RW, &io);
+ retval = io_ptr->open(device, IO_FLAG_RW, &io);
if (retval) {
- com_err(device_name, 0, "while opening device file");
+ com_err(device, 0, "while opening device file");
exit(1);
}
if (install_flag) {
install_image(device_name, image_fn, raw_flag);
- return;
+ exit (0);
}
retval = ext2fs_open (device_name, open_flag, 0, 0,
exit (1);
}
-errcode_t get_file(ext2_filsys fs, const char * filename,
+static errcode_t get_file(ext2_filsys fs, const char * filename,
struct mem_file *ret_file)
{
errcode_t retval;
char *buf;
ext2_file_t e2_file;
- int nbytes;
unsigned int got;
struct ext2_inode inode;
ext2_ino_t ino;
return retval;
}
-char *get_line(struct mem_file *file)
+static char *get_line(struct mem_file *file)
{
char *cp, *ret;
int s = 0;
return ret;
}
-int mem_file_eof(struct mem_file *file)
+static int mem_file_eof(struct mem_file *file)
{
return (file->ptr >= file->size);
}
return 0;
}
-void free_fstab_line(struct fs_info *fs)
+static void free_fstab_line(struct fs_info *fs)
{
if (fs->device)
fs->device = 0;
static void PRS(int argc, char **argv)
{
int c;
- char * tmp;
- struct group * gr;
- struct passwd * pw;
#ifdef ENABLE_NLS
setlocale(LC_MESSAGES, "");
}
}
-void get_root_type(ext2_filsys fs)
+static void get_root_type(ext2_filsys fs)
{
errcode_t retval;
struct mem_file file;
{
errcode_t retval;
ext2_filsys fs;
- struct ext2_super_block *sb;
io_manager io_ptr;
- int got, ret;
initialize_ext2_error_table();