blob: 2d92eefbb06459760b9c1b7295a69c5d9fae6d3f [file] [log] [blame]
Austin Tankiang9ccaf682019-06-06 15:05:55 +10001// Copyright 2019 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CROS_DISKS_FILESYSTEM_LABEL_H_
6#define CROS_DISKS_FILESYSTEM_LABEL_H_
7
8#include <string>
9
10namespace cros_disks {
11
12enum class LabelErrorType {
13 kLabelErrorNone = 0,
14 kLabelErrorUnsupportedFilesystem = 1,
15 kLabelErrorLongName = 2,
16 kLabelErrorInvalidCharacter = 3,
17};
18
19// Returns true if the file system type is supported, and |volume_label|
20// contains only allowed characters and length is not greater than the file
21// system's limit.
22LabelErrorType ValidateVolumeLabel(const std::string& volume_label,
23 const std::string& filesystem_type);
24
25} // namespace cros_disks
26
27#endif // CROS_DISKS_FILESYSTEM_LABEL_H_