Commit Graph

17 Commits

Author SHA1 Message Date
Yong, Jonathan
0f9e1e23da Fix mkfs out of tree builds
Libraries are built in builddir, not srcdir, fix Makefile.am
accordingly.

Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-04-21 11:42:59 -07:00
Kinglong Mee
52a3a273d1 mkfs.f2fs: check overwrite before make filesystem
Mkfs.f2fs doesn't check the overwrite of exist filesystem.
Avoid formatting an exist filesystem by mistake, a notice is important.
The code is modified from xfsprogs.

v3, add the missing update of SYNOPSIS
v2, add the manpages description of -f.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-03-06 17:15:26 -08:00
Jaegeuk Kim
85aa525057 f2fs-tools: add library version info
This patch gives the version info for two libraries.

mkfs/libf2fs_format.la
lib/libf2fs.la

The versioning rule should be:

1. Start with version information of '0:0:0' for each libtool library.
2. Update the version information only immediately before a public release of
   your software. More frequent updates are unnecessary, and only guarantee
   that the current interface number gets larger faster.
2. If the library source code has changed at all since the last update, then
   increment revision (c:r:a) becomes (c:r+1:a).
3. If any interfaces have been added, removed, or changed since the last update,
   increment current, and set revision to 0.
4. If any interfaces have been added since the last public release, then
   increment age.
5. If any interfaces have been removed or changed since the last public release,
   then set age to 0.

quoted from:
http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2015-12-09 11:08:45 -08:00
Kai-Chung Yan
d6b0f7091a mkfs/Makefile.am: add a section to build libf2fs_fmt
libf2fs_fmt is compiled from the same sources of mkfs.f2fs. This library is
required by libf2fs_utils and fastboot from the Android Open Source Project
and we believe the Android SDK maintainers from Debian will greatly benefit
from this change.

Signed-off-by: Kai-Chung Yan <seamlikok@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2015-12-09 10:26:26 -08:00
Anthony G. Basile
5792951de2 f2fs-tools: fix build system to make distcheck correctly
The current build system fails to `make distcheck` correctly
for two reasons: 1) Some header files are not listed in the
source files for fsck.f2fs and mkfs.f2fs, and so don't make it
into the dist tarball.  2) By setting a default prefix in
configure.ac, the mock install doesn't add the correct prefix
and instead tries to install directly to the file system.

This patch corrects those problems and also adds an autogen.sh
script for convenience.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2015-03-08 20:23:13 -07:00
Sankalp Bose
92a65a44e5 mkfs.f2fs: fix name conflict for BLKDISCARD
The compile time option BLKDISCARD conflicts with ioctl code
for discard. This causes discard to fail with "Info: This
device doesn't support TRIM". Rename compile time option
to WITH_BLKDISCARD.

Signed-off-by: Sankalp Bose <sankalp@tuxera.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2014-07-25 08:11:16 -07:00
Jaegeuk Kim
09f8f56066 mkfs: set BLKDISCARD by default
And let's show some debug info as well.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2014-06-13 17:48:42 +09:00
JP Abgrall
af3c6803bd split up mkfs format into main and just the format code.
This will allow using the format code as a library.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2014-04-07 12:13:51 +09:00
JP Abgrall
437dbf6773 mkfs: completely abstract the dev IO during format
This change allows for f2fs_format to work on a non-standard device (e.g.
sparse-memory backed file).
Removes direct access to config.fd from within f2fs_format.c.

Now, f2fs_format_device() can be made to work against any device by
providing
 f2fs_finalize_device()
 f2fs_trim_device()
and the lib2fs.c functions
  ASCIIToUNICODE
  dev_write
  f2fs_cal_crc32
  f2fs_set_bit
  log_base_2

This will allow Android's fastboot to use f2fs against a libsparse.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2014-01-13 10:21:08 +09:00
Jaegeuk Kim
1dc688d2fd build: revert "Compile static by default"
By default, we should use dynamic linking.
If anyone need to build 100% statically, add -all-static.

This reverts commit 2eb19102d4c5bec57c04c944ee697584a493ef9c.
2013-04-04 09:19:30 +09:00
Jaegeuk Kim
e1e843d29c build: compile static by default
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-04 09:19:19 +09:00
Jaegeuk Kim
e69e437850 build: make several base functions as a library
Let's make a library and relocate functions for other tools like fsck.f2fs.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-04 09:19:07 +09:00
Jaegeuk Kim
40b9f96587 build: move f2fs_format.h to ../include/f2fs_fs.h
This is to use f2fs.h globally, which will be used by other tools such as
fsck.f2fs.

Siged-mff-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-04 09:18:55 +09:00
Jan Engelhardt
c7e0a01375 build: place mkfs into sbindir
Filesystem creation utilities have always been in *sbin*.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2012-12-12 04:05:07 +01:00
Jan Engelhardt
fe2928a793 build: use pkgconfig to determine libuuid's parameters
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2012-12-12 03:53:28 +01:00
Jaegeuk Kim
99b7439340 Enhancement: add uuid
"Usually, it is used 128-bits UUID for serial number. Why do you use
__le32 as volume_serial_number?"
>From Vyacheslav Dubeyko.

I added an uuid facility for the serial number.
And sync with kernel/include/linux/f2fs_fs.h.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2012-11-26 19:45:59 +09:00
Jaegeuk Kim
036d45e551 mkfs: Initial commit for patch v2 series
This is same as f2fs-tools-1.1.0.tar.gz, and for patch v2 in kernel.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@gmail.com>
2012-11-26 19:45:59 +09:00