All of lore.kernel.org
 help / color / mirror / Atom feed
From: chenchacha <chen.chenchacha@foxmail.com>
To: hirofumi@mail.parknet.co.jp
Cc: linux-kernel@vger.kernel.org, andy.shevchenko@gmail.com,
	pali.rohar@gmail.com
Subject: [PATCH 0/2] fs: fat: add ioctl method to read voluem label in fat filesystem driver
Date: Fri,  5 Oct 2018 01:20:59 +0800	[thread overview]
Message-ID: <20181004172101.15525-1-chen.chenchacha@foxmail.com> (raw)

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


             reply	other threads:[~2018-10-04 17:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 17:20 chenchacha [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181004172101.15525-1-chen.chenchacha@foxmail.com \
    --to=chen.chenchacha@foxmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.