diff mbox

[1/3] VFAT GET_VOLUME_ID ioctl

Message ID 1368694144-20863-1-git-send-email-dmitry.pervushin@linaro.org
State New
Headers show

Commit Message

Dmitry Pervushin May 16, 2013, 8:49 a.m. UTC
Rename VFAT_IOCTL_GET_VOLUME_ID to VFAT_IOCTL_GET_VOLUME_ID_BROKEN
This ioctl returns the volume id via return value, which might be
incorrect in some cases, for example, if id is 0xFFFFFDAD, that
matches -ENOIOCTL.
So this ioctl will be deprecated and kept only for compatibility.

Signed-off-by: dmitry pervushin <dmitry.pervushin@linaro.org>
---
 fs/fat/dir.c                  | 2 +-
 include/uapi/linux/msdos_fs.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index 1e1d3cb..eef52ee 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -799,7 +799,7 @@  static long fat_dir_ioctl(struct file *filp, unsigned int cmd,
 		short_only = 0;
 		both = 1;
 		break;
-	case VFAT_IOCTL_GET_VOLUME_ID:
+	case VFAT_IOCTL_GET_VOLUME_ID_BROKEN:
 		return fat_ioctl_volume_id(inode);
 	default:
 		return fat_generic_ioctl(filp, cmd, arg);
diff --git a/include/uapi/linux/msdos_fs.h b/include/uapi/linux/msdos_fs.h
index db4ae0c..fddfc61 100644
--- a/include/uapi/linux/msdos_fs.h
+++ b/include/uapi/linux/msdos_fs.h
@@ -104,7 +104,7 @@  struct __fat_dirent {
 /* <linux/videotext.h> has used 0x72 ('r') in collision, so skip a few */
 #define FAT_IOCTL_GET_ATTRIBUTES	_IOR('r', 0x10, __u32)
 #define FAT_IOCTL_SET_ATTRIBUTES	_IOW('r', 0x11, __u32)
-#define VFAT_IOCTL_GET_VOLUME_ID	_IOR('r', 0x12, __u32)
+#define VFAT_IOCTL_GET_VOLUME_ID_BROKEN	_IOR('r', 0x12, __u32)
 
 struct fat_boot_sector {
 	__u8	ignored[3];	/* Boot strap short or near jump */