From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: ChenGuanqiao <chen.chenchacha@foxmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 1/2] fs: fat: Add fat filesystem partition volume label in local structure
Date: Wed, 27 Dec 2017 22:21:11 +0900 [thread overview]
Message-ID: <87incswblk.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20171227091714.4566-2-chen.chenchacha@foxmail.com> (ChenGuanqiao's message of "Wed, 27 Dec 2017 17:17:13 +0800")
ChenGuanqiao <chen.chenchacha@foxmail.com> writes:
> +static int fat_get_volume_label_entry(struct inode *dir, loff_t *pos,
> + struct buffer_head **bh,
> + struct msdos_dir_entry **de)
> +{
> + while (fat_get_entry(dir, pos, bh, de) >= 0)
> + if (((*de)->attr & ATTR_VOLUME) && (*de)->attr != ATTR_EXT)
> + return 0;
> + return -ENOENT;
> +}
> +
> +int fat_scan_volume_label(struct inode *dir, struct fat_slot_info *sinfo)
> +{
> + struct super_block *sb = dir->i_sb;
> +
> + sinfo->slot_off = 0;
> + sinfo->bh = NULL;
> + while (fat_get_volume_label_entry(dir, &sinfo->slot_off,
> + &sinfo->bh, &sinfo->de) >= 0) {
> + sinfo->slot_off -= sizeof(*sinfo->de);
> + sinfo->nr_slots = 1;
> + sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de);
> +
> + return 0;
> + }
> +
> + return -ENOENT;
> +}
> +EXPORT_SYMBOL_GPL(fat_scan_volume_label);
Why do you need sinfo?
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2017-12-27 13:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 9:17 [PATCH v5 0/2] fs: fat: add ioctl to modify fat filesystem partion volume label ChenGuanqiao
2017-12-27 9:17 ` [PATCH v5 1/2] fs: fat: Add fat filesystem partition volume label in local structure ChenGuanqiao
2017-12-27 13:21 ` OGAWA Hirofumi [this message]
2017-12-27 9:17 ` [PATCH v5 2/2] fs: fat: add ioctl method in fat filesystem driver ChenGuanqiao
2017-12-27 13:29 ` OGAWA Hirofumi
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=87incswblk.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=chen.chenchacha@foxmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome