vfat: Add compat_ioctl support for VFAT_IOCTL_GET_VOLUME_ID
authorBintian Wang <bintian.wang@linaro.org>
Thu, 27 Jun 2013 04:40:08 +0000 (12:40 +0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 2 Jul 2013 21:50:08 +0000 (14:50 -0700)
Add VFAT_IOCTL_GET_VOLUME_ID to vfat dir compat_ioctl() interface,
which enable you read vfat volume ID from a 32bit app on a 64bit
kernel

Change-Id: Ic12ac9d2d46aa50c0597fbedff32de7c8fdeac51
Signed-off-by: Bintian Wang <bintian.wang@linaro.org>
[jstultz: commit message tweaks]
Signed-off-by: John Stultz <john.stultz@linaro.org>
fs/fat/dir.c

index ddfa4529e6ea923870daa7ae457ac0b1a9cf3918..4b775e606fc8f3ee44157e8a0b5dec4be7141bb4 100644 (file)
@@ -841,6 +841,8 @@ static long fat_compat_dir_ioctl(struct file *filp, unsigned cmd,
                short_only = 0;
                both = 1;
                break;
+       case VFAT_IOCTL_GET_VOLUME_ID:
+               return fat_ioctl_volume_id(inode);
        default:
                return fat_generic_ioctl(filp, cmd, (unsigned long)arg);
        }