1 /*
2    Copyright 2017 Skytechnology sp. z o.o.
3 
4    This file is part of LizardFS.
5 
6    LizardFS is free software: you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation, version 3.
9 
10    LizardFS is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    GNU General Public License for more details.
14 
15    You should have received a copy of the GNU General Public License
16    along with LizardFS. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #pragma once
20 
21 #include "common/platform.h"
22 #include "protocol/MFSCommunication.h"
23 
24 #include <array>
25 
sugidClearModeString(SugidClearMode mode)26 inline const char *sugidClearModeString(SugidClearMode mode) {
27 	static std::array<const char *, 6> sugid_strings = {{
28 		"NEVER", "ALWAYS", "OSX", "BSD", "EXT", "XFS"
29 	}};
30 	if ((unsigned)mode >= sugid_strings.size()) {
31 		return "???";
32 	}
33 	return sugid_strings[(int)mode];
34 }
35