1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
/*
* Copyright (C) 2021 Stefano Babic <stefano.babic@swupdate.org>
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include <stdbool.h>
char *diskformat_fs_detect(char *device);
bool diskformat_fs_exists(char *device, char *fstype);
int diskformat_mkfs(char *device, char *fstype);
int diskformat_set_fslabel(char *device, char *fstype, const char *label);
#if defined(CONFIG_FAT_FILESYSTEM)
extern int fat_mkfs(const char *device_name, const char *fstype);
extern int fat_set_label(const char *device_name, const char *label);
#endif
#if defined (CONFIG_EXT_FILESYSTEM)
extern int ext_mkfs(const char *device_name, const char *fstype, unsigned long features,
const char *volume_label);
#endif
#if defined (CONFIG_BTRFS_FILESYSTEM)
extern int btrfs_mkfs(const char *device_name, const char *fstype);
#endif
|