Commit Graph

34 Commits (205593f65b2f78c2cc8116a7827c241ebc8387fc)

Author SHA1 Message Date
Jeff Sharkey 7c33c8899f blkid: add support to recognize f2fs to blkid
We can now identify f2fs filesystems and extract the UUID.

Addresses-Google-Bug: #20275581

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-14 18:39:13 -04:00
Darrick J. Wong 5d914d721a libext2fs: change ext4 on-disk layout to support metadata checksumming
Define flags and extend ext4 structure definitions to support metadata
checksumming.  Ted Ts'o covered many of these fields in an earlier
patch, but there are more required changes to the disk layout.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-30 17:44:15 -04:00
Aditya Kali 0edcc27021 e2fsprogs: reserving code points for new ext4 quota feature
This patch adds support for detecting the new 'quota' feature in ext4.
The patch reserves code points for usr and group quota inodes and also
for the feature flag EXT4_FEATURE_RO_COMPAT_QUOTA.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-02-25 18:31:52 -05:00
Eric Sandeen 801b005333 blkid: recognize btrfs
Add btrfs detection to libblkid, now that the disk format should be
recognizable in the future.

# misc/blkid /tmp/fsfile
/tmp/fsfile: LABEL="mylabel" UUID="102b07f0-0e79-4b42-8a4e-1dde418bbe6d" TYPE="btrfs"

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-01-20 00:57:59 -05:00
Theodore Ts'o efc6f628e1 Remove trailing whitespace for the entire source tree
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27 23:07:54 -04:00
Theodore Ts'o b41fb00225 libblkid: Strengthen the JFS probe routine
Check to make sure a JFS filesystem is really correct by checking the
relationship between the following fields in the JFS superblock:
s_bsize, s_l2bsize, s_pbsize, s_l2pbsize, and s_l2bfactor.  Thanks to
Lesh Bogdanow for this suggestion.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Theodore Ts'o 9c460caae3 libblkid: Enhance support for MacOS's hfs, hfsplus, and hfsx filesystems
Add detection for hfsx filesystems.  Add label and uuid detetion for
hfs, hfsplus, and hfsx.

Addresses-Sourceforge-Feature-Requests: #2060292

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 16:45:44 -04:00
Eric Sandeen a451d92f38 blkid: detect LVM2 physical volumes
Bits liberally stolen from lvm2 userspace.

Addresses-Red-Hat-Bugzilla: #409321

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-02-19 08:40:15 -05:00
Theodore Ts'o 69d742284d blkid: Add support for HFS+ detection
From SLES 10 patch: e2fsprogs-blkid_probe_hfsplus.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 00:21:07 -05:00
Theodore Ts'o 2921332fd8 Teach the blkid library about ext4/ext4dev
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-26 22:25:50 -05:00
Theodore Ts'o cb0c5d701a Add more paranoid NTFS probing and fetch UUID and LABEL information
Hopefully this addresses false positives by the blkid library when
detecting NTFS partitions.

Addresses Launchpad Bug: #110138

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-19 03:29:47 -04:00
Karel Zak b5517ca667 Add GFS/GFS2 support to the blkid library.
Signed-off-by: Karel Zak <kzak@redhat.com>
2006-09-17 21:10:58 -04:00
Matthias Andree bdc3514af4 Switch endian detection from Linuxism to AC_C_BIGENDIAN.
This fixes all blkid test failures on FreeBSD 4.11 i386.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
2006-05-30 14:42:47 +02:00
Theodore Ts'o ba5e38494e Add EXT_JOURNAL to the blkid tag of ext3 filesystems.
If the filesystem has an external journal, store the UUID of the
external journal in the tag EXT_JOURNAL.

If the filesystem type has changed, clear all the tags on the device,
not just a preset list of LABEL, UUID, TYPE, and SEC_TYPE.

Fix a bug so that blkid_set_tag will work correctly when freeing a tag
when the input name parameter comes from the tag that we are freeing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-10 18:11:35 -05:00
Theodore Ts'o ca7498596f Generic blkid library cleanup
Change superblock and generic i/o functions to be more generic.  Clean
up interface to the probe function.  Fix memory leak.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 21:07:23 -04:00
Theodore Ts'o 45a3fa8738 Add support to extract basic iso9660 label information to the blkid library
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 15:46:57 -04:00
Theodore Ts'o bb626bcd54 Add support for detecting the reiser4 filesystem in the blkid library.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-10 11:48:38 -04:00
Karel Zak c4c740ff48 Improve VFAT detection to support filesystems w/o a magic string in the superblock
The current libblkid code expects that there's magic string in FAT super
block (like "FAT12", "FAT16", ...). It's very often right, but valid FAT
super block may be without magic string too :-(

The patch from attachment fix this problem. It's inspired by HAL and
Linux kernel.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-06 08:13:35 -04:00
Theodore Ts'o 12b3c8ec1d Fix gcc -Wall nits in the blkid library. 2005-05-07 14:38:10 -04:00
Theodore Ts'o 4c4e3f7843 Fix libblkid's magic number recognition for the cramfs filesystem,
and add support to pull out the label for cramfs filesystems.  
Thanks to Karel Zak (kzak at redhat.com) for the patch.
2005-05-05 18:06:04 -04:00
Theodore Ts'o 2c92375ea4 Add support to the blkid library to recognize Oracle ASM volumes. 2005-01-21 17:57:56 -05:00
Theodore Ts'o 7369f0ce5f Apply Janos Farkas's patch to support extracting the uuid and label
information from swap partitions.

Also make sure that if a partition has a label removed, that the label is
removed form the blkid cache as well.

Add support for detecting 32k and 64k pagesize swap files.
2005-01-10 23:58:11 -05:00
Theodore Ts'o 3838f7df13 Avoid using uint and uchar types when probing for ocfs2 filesystems
in the blkid library, to allow compilation using dietlibc.
2004-11-30 19:05:38 -05:00
Theodore Ts'o 414846b126 Add support for ocfs2 detection to the blkid library,
courtesy of manish.singh@oracle.com
2004-09-17 21:37:49 -04:00
Theodore Ts'o 9387c281ef probe.c (probe_ocfs), probe.h: Add support for the Oracle
Cluster Filesystem (ocfs).  Patches courtesy of Rusty
	Lynch (rusty@linux.co.intel.com).
2004-03-04 19:59:58 -05:00
Theodore Ts'o 3de5bf6106 probe.c (probe_udf): Add specific UDF probing code, and probe
UDF before checking for ISO9660 filesystems.
2003-07-22 01:06:36 -04:00
Theodore Ts'o 09a2ef8dda Fix XFS superblock definition. Add support to
extract UUID and labels for JFS and romfs.  (Thanks to
Janos Farkas <chexum@acomp.hu>.)
2003-04-03 00:04:28 -05:00
Theodore Ts'o ed78c021c3 Fix up lots of portability problems that caused e2fsprogs not to build successfully
under Solaris.
2003-03-06 11:09:18 -05:00
Theodore Ts'o 79dd234a79 Internal changes to the blkid library:
1) Only one tag with a particular name can be attached to a device
at a time.  This significantly simplifies the library, and was needed
to allow the cache file to be re-read and changes integrated into the 
in-core version of the data structure in a simpler fashion than earlier
versions of the library. 

2)  To accomodate this, the ext2/ext3 filesystems are now always tagged
as "ext2" type filesystems.  Ext3 filesystems are tagged with a 
SEC_TYPE tag with the value ext3.

3)  The new blkid_read_cache() function checks the mod time of the
cache file, and if the file has been changed since the last time the
cache file was read into memory, it is re-read.  This function is now
called before probing all of the devices in the system or searching
all devices in the cache for a specific tag value.

4)  After probing all devices, blkid_flush_cache() is called to write
out the cache file.  This assures that all of the hard work involved
in doing a blkid_probe_all() is saved to disk.
2003-02-22 17:15:20 -05:00
Theodore Ts'o 50b380b4d4 Wholesale changes to blkid library to simplify the implementation
and shrink its size.  Change library version to be 1.0.
2003-02-12 23:51:21 -05:00
Theodore Ts'o 76b07bb1bc Roto-till and clean up libblkid API.
read.c (parse_tag): Do not return that blkid_tag when parsing
	the blkid.tag file.

resolve.c (blkid_get_token, blkid_get_tagname_devname): Fold in
	code from removed functions

tag.c (blkid_create_tag): Don't return the newly tag strcture
	any more, as it's not needed.
	(blkid_find_tag_cache, blkid_get_tag_cache,
	 blkid_token_to_tag, blkid_find_tv_tags): Remove these 
	functions, as they are either only used once or have
	interfaces that should be deprecated.
	(blkid_find_tag_dev, blkid_find_head_cache): Replace use
	of blkid_tag with one or two const char * type/value
	arguments.
	(blkid_find_dev_with_tag): Fold in code from removed functions

probe.h, probe.c: Use a more sophisticated set of byte-swapping
	routines which are more compact and efficient.  Drop
	calculation of bid_free, since it's unnecessary.  Avoid 

save.c (blkid_save_cache): Set the permissions on the blkid
	cache file to 644.
2003-01-27 01:09:24 -05:00
Theodore Ts'o 7a603aa89f Separate public and private interfaces into separate header files.
Start separating internal implementation details from the
publically exported interface of the blkid library.
2003-01-26 01:54:39 -05:00
Theodore Ts'o d3f917989b Fix gcc -Wall nits. 2003-01-25 00:26:48 -05:00
Theodore Ts'o e12f2ae74c Integrate new blkid library. 2003-01-23 16:45:16 -05:00