aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/util.c')
-rw-r--r--e2fsprogs/util.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/e2fsprogs/util.c b/e2fsprogs/util.c
index 7e9c09234..3902f7ef3 100644
--- a/e2fsprogs/util.c
+++ b/e2fsprogs/util.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * util.c --- helper functions used by tune2fs and mke2fs 2 * util.c --- helper functions used by tune2fs and mke2fs
3 * 3 *
4 * Copyright 1995, 1996, 1997, 1998, 1999, 2000 by Theodore Ts'o. 4 * Copyright 1995, 1996, 1997, 1998, 1999, 2000 by Theodore Ts'o.
5 * 5 *
6 * %Begin-Header% 6 * %Begin-Header%
@@ -99,8 +99,8 @@ void check_mount(const char *device, int force, const char *type)
99 bb_error_msg_and_die("will not make a %s here!", type); 99 bb_error_msg_and_die("will not make a %s here!", type);
100} 100}
101 101
102void parse_journal_opts(char **journal_device, int *journal_flags, 102void parse_journal_opts(char **journal_device, int *journal_flags,
103 int *journal_size, const char *opts) 103 int *journal_size, const char *opts)
104{ 104{
105 char *buf, *token, *next, *p, *arg; 105 char *buf, *token, *next, *p, *arg;
106 int journal_usage = 0; 106 int journal_usage = 0;
@@ -118,7 +118,7 @@ void parse_journal_opts(char **journal_device, int *journal_flags,
118 if (p) { 118 if (p) {
119 *p = 0; 119 *p = 0;
120 next = p+1; 120 next = p+1;
121 } 121 }
122 arg = strchr(token, '='); 122 arg = strchr(token, '=');
123 if (arg) { 123 if (arg) {
124 *arg = 0; 124 *arg = 0;
@@ -155,13 +155,13 @@ void parse_journal_opts(char **journal_device, int *journal_flags,
155 "\tdevice=<journal device>\n\n" 155 "\tdevice=<journal device>\n\n"
156 "The journal size must be between " 156 "The journal size must be between "
157 "1024 and 102400 filesystem blocks.\n\n"); 157 "1024 and 102400 filesystem blocks.\n\n");
158} 158}
159 159
160/* 160/*
161 * Determine the number of journal blocks to use, either via 161 * Determine the number of journal blocks to use, either via
162 * user-specified # of megabytes, or via some intelligently selected 162 * user-specified # of megabytes, or via some intelligently selected
163 * defaults. 163 * defaults.
164 * 164 *
165 * Find a reasonable journal file size (in blocks) given the number of blocks 165 * Find a reasonable journal file size (in blocks) given the number of blocks
166 * in the filesystem. For very small filesystems, it is not reasonable to 166 * in the filesystem. For very small filesystems, it is not reasonable to
167 * have a journal that fills more than half of the filesystem. 167 * have a journal that fills more than half of the filesystem.
@@ -214,8 +214,8 @@ void make_journal_device(char *journal_device, ext2_filsys fs, int quiet, int fo
214 io_manager io_ptr; 214 io_manager io_ptr;
215 215
216 check_plausibility(journal_device, force); 216 check_plausibility(journal_device, force);
217 check_mount(journal_device, force, "journal"); 217 check_mount(journal_device, force, "journal");
218 io_ptr = unix_io_manager; 218 io_ptr = unix_io_manager;
219 retval = ext2fs_open(journal_device, EXT2_FLAG_RW| 219 retval = ext2fs_open(journal_device, EXT2_FLAG_RW|
220 EXT2_FLAG_JOURNAL_DEV_OK, 0, 220 EXT2_FLAG_JOURNAL_DEV_OK, 0,
221 fs->blocksize, io_ptr, &jfs); 221 fs->blocksize, io_ptr, &jfs);
@@ -236,7 +236,7 @@ void make_journal_blocks(ext2_filsys fs, int journal_size, int journal_flags, in
236{ 236{
237 unsigned long journal_blocks; 237 unsigned long journal_blocks;
238 errcode_t retval; 238 errcode_t retval;
239 239
240 journal_blocks = figure_journal_size(journal_size, fs); 240 journal_blocks = figure_journal_size(journal_size, fs);
241 if (!journal_blocks) { 241 if (!journal_blocks) {
242 fs->super->s_feature_compat &= 242 fs->super->s_feature_compat &=
@@ -259,9 +259,9 @@ char *e2fs_set_sbin_path(void)
259 char *oldpath = getenv("PATH"); 259 char *oldpath = getenv("PATH");
260 /* Update our PATH to include /sbin */ 260 /* Update our PATH to include /sbin */
261#define PATH_SET "/sbin" 261#define PATH_SET "/sbin"
262 if (oldpath) 262 if (oldpath)
263 oldpath = bb_xasprintf("%s:%s", PATH_SET, oldpath); 263 oldpath = bb_xasprintf("%s:%s", PATH_SET, oldpath);
264 else 264 else
265 oldpath = PATH_SET; 265 oldpath = PATH_SET;
266 putenv (oldpath); 266 putenv (oldpath);
267 return oldpath; 267 return oldpath;