All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fs: fat: add ioctl method to read voluem label in fat filesystem driver
@ 2018-10-04 17:20 chenchacha
  2018-10-04 17:21 ` [PATCH 2/2] Add a new function to get root directory with ATTR_VOLUME chenchacha
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: chenchacha @ 2018-10-04 17:20 UTC (permalink / raw)
  To: hirofumi; +Cc: linux-kernel, andy.shevchenko, pali.rohar

This patch add fat ioctl command FAT_IOCTL_GET_VOLUME_LABEL.

We can get the volume label with this command:

	ioctl(fd, FAT_IOCTL_GET_VOLUME_LABEL, &volume_label);

FAT volume label (volume name) is exactly same stored in boot sector and root
directory. And this patch read label only from the root directory. If label in
root directory is missing then disk would be treated as without label. Label
from boot sector would not be read.

The volume label format reference from Pali Rohár testing results
(https://www.spinics.net/lists/kernel/msg2645732.html) in the previous mail.

chenchacha (2):
  Add FAT_IOCTL_GET_VOLUME_LABEL in fat_generic_ioctl()
  Add a new function to get root directory with ATTR_VOLUME

 fs/fat/dir.c                  | 13 +++++++++++++
 fs/fat/fat.h                  |  2 ++
 fs/fat/file.c                 | 22 ++++++++++++++++++++++
 include/uapi/linux/msdos_fs.h |  1 +
 4 files changed, 38 insertions(+)

-- 
2.19.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-06  8:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 17:20 [PATCH 0/2] fs: fat: add ioctl method to read voluem label in fat filesystem driver chenchacha
2018-10-04 17:21 ` [PATCH 2/2] Add a new function to get root directory with ATTR_VOLUME chenchacha
2018-10-04 17:29   ` Pali Rohár
2018-10-04 17:26 ` [PATCH 0/2] fs: fat: add ioctl method to read voluem label in fat filesystem driver Pali Rohár
     [not found] ` <20181004172101.15525-2-chen.chenchacha@foxmail.com>
2018-10-04 17:33   ` [PATCH 1/2] Add FAT_IOCTL_GET_VOLUME_LABEL in fat_generic_ioctl() Pali Rohár
     [not found]     ` <5bb8734a.1c69fb81.9fdf4.0461SMTPIN_ADDED_BROKEN@mx.google.com>
2018-10-06  8:37       ` Pali Rohár

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.