37 |
val = stat(device, &s); |
val = stat(device, &s); |
38 |
if (force) |
if (force) |
39 |
return; |
return; |
40 |
if(val == -1) |
if (val == -1) |
41 |
bb_perror_msg_and_die("cannot stat %s", device); |
bb_perror_msg_and_die("cannot stat %s", device); |
42 |
if (!S_ISBLK(s.st_mode)) { |
if (!S_ISBLK(s.st_mode)) { |
43 |
printf("%s is not a block special device.\n", device); |
printf("%s is not a block special device.\n", device); |
220 |
fs->blocksize, io_ptr, &jfs); |
fs->blocksize, io_ptr, &jfs); |
221 |
if (retval) |
if (retval) |
222 |
bb_error_msg_and_die("cannot journal device %s", journal_device); |
bb_error_msg_and_die("cannot journal device %s", journal_device); |
223 |
if(!quiet) |
if (!quiet) |
224 |
printf("Adding journal to device %s: ", journal_device); |
printf("Adding journal to device %s: ", journal_device); |
225 |
fflush(stdout); |
fflush(stdout); |
226 |
retval = ext2fs_add_journal_device(fs, jfs); |
retval = ext2fs_add_journal_device(fs, jfs); |
227 |
if(retval) |
if (retval) |
228 |
bb_error_msg_and_die("\nFailed to add journal to device %s", journal_device); |
bb_error_msg_and_die("\nFailed to add journal to device %s", journal_device); |
229 |
if(!quiet) |
if (!quiet) |
230 |
puts("done"); |
puts("done"); |
231 |
ext2fs_close(jfs); |
ext2fs_close(jfs); |
232 |
} |
} |
242 |
~EXT3_FEATURE_COMPAT_HAS_JOURNAL; |
~EXT3_FEATURE_COMPAT_HAS_JOURNAL; |
243 |
return; |
return; |
244 |
} |
} |
245 |
if(!quiet) |
if (!quiet) |
246 |
printf("Creating journal (%ld blocks): ", journal_blocks); |
printf("Creating journal (%ld blocks): ", journal_blocks); |
247 |
fflush(stdout); |
fflush(stdout); |
248 |
retval = ext2fs_add_journal_inode(fs, journal_blocks, |
retval = ext2fs_add_journal_inode(fs, journal_blocks, |
249 |
journal_flags); |
journal_flags); |
250 |
if(retval) |
if (retval) |
251 |
bb_error_msg_and_die("cannot create journal"); |
bb_error_msg_and_die("cannot create journal"); |
252 |
if(!quiet) |
if (!quiet) |
253 |
puts("done"); |
puts("done"); |
254 |
} |
} |
255 |
|
|
262 |
oldpath = xasprintf("%s:%s", PATH_SET, oldpath); |
oldpath = xasprintf("%s:%s", PATH_SET, oldpath); |
263 |
else |
else |
264 |
oldpath = PATH_SET; |
oldpath = PATH_SET; |
265 |
putenv (oldpath); |
putenv(oldpath); |
266 |
return oldpath; |
return oldpath; |
267 |
} |
} |