X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=fs%2Ffs.c;h=cb68e81cd3095637d441fd4d4169c5f4ea1f404c;hb=cf2250e7877377ebdccc4767b431b99f4d0061c7;hp=6155cb1daf34352c95f3d5270e5cf7b8d7b0e32f;hpb=1d12a7c8cd4e58d5c3989bc239d5fa9577079dfd;p=oweals%2Fu-boot.git diff --git a/fs/fs.c b/fs/fs.c index 6155cb1daf..cb68e81cd3 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -1,7 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. - * - * SPDX-License-Identifier: GPL-2.0 */ #include @@ -113,7 +112,7 @@ struct fstype_info { * Is it legal to pass NULL as .probe()'s fs_dev_desc parameter? This * should be false in most cases. For "virtual" filesystems which * aren't based on a U-Boot block device (e.g. sandbox), this can be - * set to true. This should also be true for the dumm entry at the end + * set to true. This should also be true for the dummy entry at the end * of fstypes[], since that is essentially a "virtual" (non-existent) * filesystem. */ @@ -266,6 +265,19 @@ static struct fstype_info *fs_get_info(int fstype) return info; } +/** + * fs_get_type_name() - Get type of current filesystem + * + * Return: Pointer to filesystem name + * + * Returns a string describing the current filesystem, or the sentinel + * "unsupported" for any unrecognised filesystem. + */ +const char *fs_get_type_name(void) +{ + return fs_get_info(fs_type)->name; +} + int fs_set_blk_dev(const char *ifname, const char *dev_part_str, int fstype) { struct fstype_info *info;