2021-09-04 04:29:06 +08:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public
|
|
|
|
* License v2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 021110-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PARSE_UTILS_H__
|
|
|
|
#define __PARSE_UTILS_H__
|
|
|
|
|
|
|
|
#include "kerncompat.h"
|
|
|
|
|
|
|
|
enum btrfs_csum_type parse_csum_type(const char *s);
|
|
|
|
|
2021-09-04 05:16:48 +08:00
|
|
|
int parse_u64(const char *str, u64 *result);
|
2024-01-17 12:10:40 +08:00
|
|
|
int parse_u64_with_suffix(const char *s, u64 *value_ret);
|
2021-09-04 05:16:48 +08:00
|
|
|
int parse_range_u32(const char *range, u32 *start, u32 *end);
|
|
|
|
int parse_range(const char *range, u64 *start, u64 *end);
|
|
|
|
int parse_range_strict(const char *range, u64 *start, u64 *end);
|
2021-09-06 21:57:27 +08:00
|
|
|
int parse_bg_profile(const char *profile, u64 *flags);
|
2021-09-06 22:06:55 +08:00
|
|
|
int parse_compress_type(const char *type);
|
2021-09-07 19:56:33 +08:00
|
|
|
int parse_qgroupid(const char *str, u64 *qgroupid);
|
2022-09-16 05:23:04 +08:00
|
|
|
u64 parse_qgroupid_or_path(const char *p);
|
2021-09-04 04:29:06 +08:00
|
|
|
int fls64(u64 x);
|
|
|
|
|
|
|
|
#endif
|