chore: Add more documentation

This commit is contained in:
Myzel394 2024-08-07 22:34:33 +02:00
parent 4b2b2c3624
commit 4d4d8a1376
No known key found for this signature in database
GPG Key ID: DEC4AAB876F73185
3 changed files with 42 additions and 21 deletions

View File

@ -6,11 +6,15 @@ var AdfsDocumentationAssignable = map[docvalues.EnumString]docvalues.Value{
docvalues.CreateEnumStringWithDoc(
"uid",
"Set the owner of the files in the filesystem (default: uid=0).",
): docvalues.PositiveNumbeValue(),
): docvalues.UIDValue{
EnforceUsingExisting: true,
},
docvalues.CreateEnumStringWithDoc(
"gid",
"Set the group of the files in the filesystem (default: gid=0).",
): docvalues.PositiveNumbeValue(),
): docvalues.GIDValue{
EnforceUsingExisting: true,
},
docvalues.CreateEnumStringWithDoc(
"ownmask",
"Set the permission mask for ADFS 'owner' permissions (default: 0700).",
@ -20,3 +24,5 @@ var AdfsDocumentationAssignable = map[docvalues.EnumString]docvalues.Value{
"Set the permission mask for ADFS 'other' permissions (default: 0077).",
): docvalues.StringValue{},
}
var AdfsDocumentationEnums = []docvalues.EnumString{}

View File

@ -2,39 +2,33 @@ package commondocumentation
import docvalues "config-lsp/doc-values"
var prefixMaxLength = uint32(30)
var AffsDocumentationAssignable = map[docvalues.EnumString]docvalues.Value{
docvalues.CreateEnumStringWithDoc(
"uid",
"Set the owner and group of the root of the filesystem (default: uid=gid=0, but with option uid or gid without specified value, the UID and GID of the current process are taken).",
): docvalues.NumberValue{Min: &zero},
): docvalues.UIDValue{
EnforceUsingExisting: true,
},
docvalues.CreateEnumStringWithDoc(
"gid",
"Set the owner and group of the root of the filesystem (default: uid=gid=0, but with option uid or gid without specified value, the UID and GID of the current process are taken).",
): docvalues.NumberValue{Min: &zero},
): docvalues.GIDValue{
EnforceUsingExisting: true,
},
docvalues.CreateEnumStringWithDoc(
"setuid",
"Set the owner of all files.",
): docvalues.NumberValue{Min: &zero},
): docvalues.StringValue{},
docvalues.CreateEnumStringWithDoc(
"setgid",
"Set the group of all files.",
): docvalues.NumberValue{Min: &zero},
): docvalues.StringValue{},
docvalues.CreateEnumStringWithDoc(
"mode",
"Set the mode of all files to value & 0777 disregarding the original permissions. Add search permission to directories that have read permission. The value is given in octal.",
): docvalues.StringValue{},
docvalues.CreateEnumStringWithDoc(
"protect",
"Do not allow any changes to the protection bits on the filesystem.",
): docvalues.StringValue{},
docvalues.CreateEnumStringWithDoc(
"usemp",
"Set UID and GID of the root of the filesystem to the UID and GID of the mount point upon the first sync or umount, and then clear this option. Strange...",
): docvalues.StringValue{},
docvalues.CreateEnumStringWithDoc(
"verbose",
"Print an informational message for each successful mount.",
): docvalues.StringValue{},
docvalues.CreateEnumStringWithDoc(
"prefix",
"Prefix used before volume name, when following a link.",
@ -42,7 +36,7 @@ var AffsDocumentationAssignable = map[docvalues.EnumString]docvalues.Value{
docvalues.CreateEnumStringWithDoc(
"volume",
"Prefix (of length at most 30) used before '/' when following a symbolic link.",
): docvalues.StringValue{},
): docvalues.StringValue{MaxLength: &prefixMaxLength},
docvalues.CreateEnumStringWithDoc(
"reserved",
"(Default: 2.) Number of unused blocks at the start of the device.",
@ -80,3 +74,18 @@ var AffsDocumentationAssignable = map[docvalues.EnumString]docvalues.Value{
"These options are accepted but ignored. (However, quota utilities may react to such strings in /etc/fstab.)",
): docvalues.StringValue{},
}
var AffsDocumentationEnums = []docvalues.EnumString{
docvalues.CreateEnumStringWithDoc(
"protect",
"Do not allow any changes to the protection bits on the filesystem.",
),
docvalues.CreateEnumStringWithDoc(
"usemp",
"Set UID and GID of the root of the filesystem to the UID and GID of the mount point upon the first sync or umount, and then clear this option. Strange...",
),
docvalues.CreateEnumStringWithDoc(
"verbose",
"Print an informational message for each successful mount.",
),
}

View File

@ -6,13 +6,19 @@ var DebugfsDocumentationAssignable = map[docvalues.EnumString]docvalues.Value{
docvalues.CreateEnumStringWithDoc(
"uid",
"Set the owner of the mountpoint.",
): docvalues.NumberValue{Min: &zero},
): docvalues.UIDValue{
EnforceUsingExisting: true,
},
docvalues.CreateEnumStringWithDoc(
"gid",
"Set the group of the mountpoint.",
): docvalues.NumberValue{Min: &zero},
): docvalues.GIDValue{
EnforceUsingExisting: true,
},
docvalues.CreateEnumStringWithDoc(
"mode",
"Sets the mode of the mountpoint.",
): docvalues.StringValue{},
}
var DebugfsDocumentationEnums = []docvalues.EnumString{}