void check_plausibility(const char *device, int force)
{
int val;
- STRUCT_STAT s;
- val = STAT(device, &s);
+ struct stat s;
+ val = stat(device, &s);
if (force)
return;
if(val == -1)
- bb_perror_msg_and_die("Could not stat %s", device);
+ bb_perror_msg_and_die("cannot stat %s", device);
if (!S_ISBLK(s.st_mode)) {
printf("%s is not a block special device.\n", device);
proceed_question();
retval = ext2fs_check_if_mounted(device, &mount_flags);
if (retval) {
- bb_error_msg("Could not determine if %s is mounted", device);
+ bb_error_msg("cannot determine if %s is mounted", device);
return;
}
if (mount_flags & EXT2_MF_MOUNTED) {
EXT2_FLAG_JOURNAL_DEV_OK, 0,
fs->blocksize, io_ptr, &jfs);
if (retval)
- bb_error_msg_and_die("Could not journal device %s", journal_device);
+ bb_error_msg_and_die("cannot journal device %s", journal_device);
if(!quiet)
printf("Adding journal to device %s: ", journal_device);
fflush(stdout);
retval = ext2fs_add_journal_inode(fs, journal_blocks,
journal_flags);
if(retval)
- bb_error_msg_and_die("Could not create journal");
+ bb_error_msg_and_die("cannot create journal");
if(!quiet)
puts("done");
}