summaryrefslogtreecommitdiffstats
path: root/disk-utils/mkfs.minix.c
Commit message (Collapse)AuthorAgeFilesLines
...
* mkfs.minix: remove redundant codeMaurizio Lombardi2011-11-211-2/+0Star
|
* mkfs.minix: fix write_all() usageKarel Zak2011-08-171-15/+6Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: fix compiler warnings [-Wsign-compare]Karel Zak2011-08-011-17/+31
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'cramfs' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2011-07-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'cramfs' of https://github.com/kerolasa/lelux-utiliteetit: include: move fsck return values to exitcodes.h include: move disk-utils/mkfs.h -> include/exitcodes.h mkfs.cramfs: coding style mkfs.cramfs: include-what-you-use header check mkfs.cramfs: error printing fixes mkfs.cramfs: convert spaces to tabs mkfs.cramfs: validate numeric user inputs mkfs.cramfs: few symbolic exit codes where missing md5: use symbolical digest length mkfs.cramfs: use program_invocation_short_name mkfs.cramfs: use xalloc.h fsck.cramfs: add missed strings to translation fsck.cramfs: coding style fsck.cramfs: use xalloc.h fsck.cramfs: retire die function cramfs.h: coding style cramfs: use stdint.h instead of u{8,16,32} cramfs_common: coding style Conflicts: disk-utils/Makefile.am Signed-off-by: Karel Zak <kzak@redhat.com>
| * include: move disk-utils/mkfs.h -> include/exitcodes.hSami Kerola2011-07-221-1/+1
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | minix: remove unnecessary initializationsKarel Zak2011-07-211-13/+13
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | minix: add MINIX_ prefix to some global macrosKarel Zak2011-07-211-5/+5
| | | | | | | | | | | | ... and remove some tailing whitespaces. Signed-off-by: Karel Zak <kzak@redhat.com>
* | minix: cleanup global variables and macrosKarel Zak2011-07-211-1/+14
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | minix: move globals and inline functions to minix_programs.hSami Kerola2011-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | Global variables and inline functions are moved from minix.h to minix_programs.h which is included in mkfs.minix and fsck.minix. The minix.h will have only struct definitions etc generic contents which is reasonable to share with utilities and libraries. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | libblkid: use MINIX_BLOCK_SIZE from minix.hSami Kerola2011-07-201-38/+38
|/ | | | | | | | | | In the minix.h two definitions where renamed, so that the single definition is reusable in fsck.minix, mkfs.minix and libblkid. BLOCK_SIZE_BITS -> MINIX_BLOCK_SIZE_BITS BLOCK_SIZE -> MINIX_BLOCK_SIZE Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* minix: remove fs stateDavidlohr Bueso2011-07-141-5/+2Star
| | | | | | | | For v3 minix superblocks the state flag (s_state) has been removed, so drop it from the structure in accordance with the kernel's representation. Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mkfs.minix: add minix v3 supportDavidlohr Bueso2011-07-111-32/+107
| | | | | | | | | | | | | | | | | | | | | We can now create minix v3 filesystems. Support for this fs was added a few years ago in the Linux kernel. One of the most important benefits is the ability to handle file names up to 60 characters long. With this change we also introduce the -3 option which naturally indicates which version to create. Version 1 is still left as the default one for backwards compatibility reasons. [kzak@redhat.com: - fix gcc warnings: mkfs.minix.c: In function ‘super_set_state_ptr’: mkfs.minix.c:174:1: warning: no return statement in function returning non-void [-Wreturn-type] mkfs.minix.c: In function ‘write_tables’: mkfs.minix.c:182:7: warning: unused variable ‘state’ [-Wunused-variable] mkfs.minix.c: At top level: mkfs.minix.c:111:27: warning: ‘blksz’ defined but not used [-Wunused-variable] ] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: check for misalignmentDavidlohr Bueso2011-06-271-0/+5
| | | | | | | | | Produce a warning if the device is misaligned. [kzak@redhat.com: - use it for block devices only] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: [blkdev.c] remove kernel version check from blkdev_get_sector_size()Karel Zak2011-06-271-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: add fs version optionsDavidlohr Bueso2011-06-141-2/+6
| | | | | | | Like the original minix mkfs, add the -1 and -2 argument options to specify the version of the filesystem to create. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mkfs.minix: standardize superblock attribute settingsDavidlohr Bueso2011-06-141-5/+27
| | | | | | | | Because of the dependence of fs_version, some superblock attributes will vary, so simplify the logic of assigning values to maxsize and the amount of zones related to each filesystem, thus making setup_tables() more readable. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mkfs.minix: use inode wrappersDavidlohr Bueso2011-06-081-11/+21
| | | | | | | Use a common function for creating the root and bad inode, without worring about the fs version. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mkfs.minix: use common functionalityDavidlohr Bueso2011-06-021-98/+70Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mkfs.minix: remove die()Davidlohr Bueso2011-05-041-44/+48
| | | | | | | | | | | Get rid of this function and use errx(3) instead. This patch also introduces a mkfs.h header and defines general purpose mkfs related exit codes. [kzak@redhat.com: - fix "warning: too many arguments for format" errors] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: general cleanupsDavidlohr Bueso2011-02-141-140/+142
| | | | | | | This patch provides some minor code fixes: add/remove some macros and close the device after usage. Also modifies usage() and changes main()'s indentation to 8-characters. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* messages: gettextize a few skipped or forgotten onesBenno Schulenberg2010-06-141-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* mkfs.minix: fix strict-aliasing bugsKarel Zak2009-10-171-2/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.minix: fix broken zone checkingKarel Zak2009-10-151-3/+2Star
| | | | | | | | | | | | | This bug has been introduced by commit 95356e8b744439336925eeb36f01399f1ee8a5e9. The fsck.minix code assumes that isset() macro returns boolean, unfortunately the generic implementation from libc returns integer. This patch also add a fallback for the bitmap macros to include/bitops.h. Reported-by: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl> Signed-off-by: Karel Zak <kzak@redhat.com>
* Remove now unused <sys/ioctl.h> includesGuillem Jover2009-10-091-1/+0Star
| | | | | | Those became unused with the switch to the blkdev functions. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* mkfs.minix: remove local implementation of {set,clr}bitKarel Zak2009-02-051-8/+3Star
| | | | | | We needn't to duplicate stuff from <sys/param.h>. Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: (and fsck) rename bitops.hKarel Zak2008-12-051-2/+2
| | | | | | | This patch renames bitops.h to minix_bitops.h to avoid possible collisions with global include/bitops.h file. Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: fix size detectionMatthias Koenig2008-11-131-2/+7
| | | | | | | | blkdev_get_size returns size in bytes, so BLOCKS has to be calculated accordingly. Use stat value for size if device is not a block device. Signed-off-by: Matthias Koenig <mkoenig@suse.de>
* disk-utils: s/MOUNTED/_PATH_MOUNTED/maximilian attems2008-07-281-1/+2
| | | | | | | | | no longer use deprecated alias. helps compiling util-linux-ng against klibc. add pathnames.h include, where _PATH_MOUNTED is defined. Signed-off-by: maximilian attems <max@stro.at>
* mkfs.minix: clean up gcc warningsKarel Zak2008-03-201-31/+0Star
| | | | | | mkfs.minix.c:199: warning: ‘count_blocks’ defined but not used Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.minix: device size cleanupMatthias Koenig2007-11-211-36/+14Star
| | | | | | Use blkdev_get_size() function and some size related cleanup. Signed-off-by: Matthias Koenig <mkoenig@suse.de>
* mkfs.minix: add sectorsize checkMatthias Koenig2007-11-211-2/+10
| | | | | | | | | | | | Minix filesystem until version 2 has a fixed blocksize of 1024 bytes. If you try to create a filsystem on a device with a physical sectorsize larger than 1024 bytes, this resulting minix fs cannot be mounted, because the physical sectorsize must be smaller than the filesystem blocksize. This patch adds a check for this and will refuse to create a filesystem if the sectorsize is bigger than the blocksize. Signed-off-by: Matthias Koenig <mkoenig@suse.de>
* mkfs.minix: clean up gcc warningsRandy Dunlap2007-10-111-1/+4
| | | | | | | | | | | | * clean up code, gcc warnings (try compilation with "-Wall -Wp,-D_FORTIFY_SOURCE=2") Builds cleanly on x86_32 and x86_64. mkfs.minix.c:595: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* disk-utils: let mkfs tools open with O_EXCLMatthias Koenig2007-07-271-3/+6
| | | | | | | | | | | | | Let mkswap, mkfs.bfs, mkfs.minix open with O_EXCL if used on block devices to prevent writing to the device even if they are busy (mounted). Unfortunately, O_EXCL has zero effect for 2.4 kernels where in-kernel code doesn't use O_EXCL-like access locks. (Tested on RHEL3.) Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.13-pre2 tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.12b tarball.Karel Zak2006-12-071-43/+19Star
|
* Imported from util-linux-2.11x tarball.Karel Zak2006-12-071-13/+9Star
|
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11m tarball.Karel Zak2006-12-071-15/+19
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-5/+5
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-59/+49Star
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-4/+22
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-88/+98
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.8 tarball.Karel Zak2006-12-071-15/+27
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-132/+306
|
* Imported from util-linux-2.5 tarball.Karel Zak2006-12-071-22/+35
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+533