*
* 30.10.94 - Added support for v2 filesystem
* (Andreas Schwab, schwab@issan.informatik.uni-dortmund.de)
- *
+ *
* 09.11.94 - Added test to prevent overwrite of mounted fs adapted
* from Theodore Ts'o's (tytso@athena.mit.edu) mke2fs
* program. (Daniel Quinlan, quinlan@yggdrasil.com)
*/
static size_t do_check(const struct fs_control *ctl, char * buffer, int try, unsigned int current_block) {
ssize_t got;
-
+
/* Seek to the correct loc. */
if (lseek(ctl->device_fd, current_block * MINIX_BLOCK_SIZE, SEEK_SET) !=
current_block * MINIX_BLOCK_SIZE )
/* Try the read */
got = read(ctl->device_fd, buffer, try * MINIX_BLOCK_SIZE);
- if (got < 0) got = 0;
+ if (got < 0) got = 0;
if (got & (MINIX_BLOCK_SIZE - 1 )) {
printf(_("Weird values in do_check: probably bugs\n"));
}
static void determine_device_blocks(struct fs_control *ctl, const struct stat *statbuf)
{
- unsigned long long dev_blocks;
+ unsigned long long dev_blocks = 0;
if (S_ISBLK(statbuf->st_mode)) {
int sectorsize;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- atexit(close_stdout);
+ close_stdout_atexit();
strutils_set_exitcode(MKFS_EX_USAGE);
listfile = optarg;
break;
case 'V':
- printf(UTIL_LINUX_VERSION);
- return MKFS_EX_OK;
+ print_version(MKFS_EX_OK);
case 'h':
usage();
default: