OpenCloudOS-Kernel/fs/fat
Mike Lockwood 6e5b93ee55 fatfs: add FAT_IOCTL_GET_VOLUME_ID
This patch, originally from Android kernel, adds vfat ioctl command
FAT_IOCTL_GET_VOLUME_ID, with this command we can get the vfat volume ID
using following code:

	ioctl(fd, FAT_IOCTL_GET_VOLUME_ID, &volume_ID)

This patch is a modified version of the patch by Mike Lockwood, with
changes from Dmitry Pervushin, who noticed the original patch makes some
volume IDs abiguous with error returns: for example, if volume id is
0xFFFFFDAD, that matches -ENOIOCTLCMD, we get "FFFFFFFF" from the user
space.

So add a parameter to ioctl to get the correct volume ID.

Android uses vfat volume ID to identify different sd card, when a new sd
card is inserted to device, android can scan the media on it and pop up
new contents.

Signed-off-by: Bintian Wang <bintian.wang@linaro.org>
Cc: dmitry pervushin <dpervushin@gmail.com>
Cc: Mike Lockwood <lockwood@android.com>
Cc: Colin Cross <ccross@android.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Sean McNeil <sean@mcneil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-09 10:33:25 -07:00
..
Kconfig vfat: Note the NLS requirement 2009-04-17 09:32:11 -07:00
Makefile fat (exportfs): move NFS support code 2012-10-06 03:05:09 +09:00
cache.c fs/fat: fix two checkpatch issues in cache.c 2012-10-06 03:05:10 +09:00
dir.c [readdir] convert fatfs 2013-06-29 12:57:01 +04:00
fat.h fatfs: add FAT_IOCTL_GET_VOLUME_ID 2013-07-09 10:33:25 -07:00
fatent.c fat: no need to reset EOF in ent_put for FAT32 2012-10-06 03:05:12 +09:00
file.c fatfs: add FAT_IOCTL_GET_VOLUME_ID 2013-07-09 10:33:25 -07:00
inode.c fatfs: add FAT_IOCTL_GET_VOLUME_ID 2013-07-09 10:33:25 -07:00
misc.c fs/fat: use fat_msg() to replace printk() in __fat_fs_error() 2013-07-03 16:08:01 -07:00
namei_msdos.c Don't pass inode to ->d_hash() and ->d_compare() 2013-06-29 12:57:36 +04:00
namei_vfat.c Don't pass inode to ->d_hash() and ->d_compare() 2013-06-29 12:57:36 +04:00
nfs.c fat (exportfs): rebuild directory-inode if fat_dget() 2013-04-29 18:28:41 -07:00