feat(aa): update templates to last struct changes.

This commit is contained in:
Alexandre Pujol 2024-06-29 22:33:45 +01:00
parent 4e1b972ee5
commit 8377dde5d2
Failed to generate hash of commit
10 changed files with 51 additions and 16 deletions

View file

@ -7,11 +7,10 @@
{{- if .Owner -}} {{- if .Owner -}}
{{- "owner " -}} {{- "owner " -}}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- .Path -}} {{- .Path -}}
{{- " " -}} {{- " " -}}
{{- with .Padding -}} {{- .Padding 3 -}}
{{ . }}
{{- end -}}
{{- range .Access -}} {{- range .Access -}}
{{- . -}} {{- . -}}
{{- end -}} {{- end -}}
@ -19,9 +18,7 @@
{{ " -> " }}{{ . }} {{ " -> " }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- with .Suffix -}} {{- .Padding 4 -}}
{{ . }}
{{- end -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}
@ -30,18 +27,18 @@
{{- if .Owner -}} {{- if .Owner -}}
{{- "owner " -}} {{- "owner " -}}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- "link " -}} {{- "link " -}}
{{- if .Subset -}} {{- if .Subset -}}
{{- "subset " -}} {{- "subset " -}}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- .Path -}} {{- .Path -}}
{{- " " -}} {{- " " -}}
{{- with .Target -}} {{- with .Target -}}
{{ "-> " }}{{ . }} {{ "-> " }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- with .Suffix -}} {{- .Padding 4 -}}
{{ . }}
{{- end -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}

View file

@ -5,12 +5,14 @@
{{- define "io_uring" -}} {{- define "io_uring" -}}
{{- template "qualifier" . -}} {{- template "qualifier" . -}}
{{- "io_uring" -}} {{- "io_uring" -}}
{{- range .Access -}} {{- with .Access -}}
{{ " " }}{{ . }} {{ " " }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Label -}} {{- with .Label -}}
{{ " label=" }}{{ . }} {{ " label=" }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 3 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}

View file

@ -8,16 +8,20 @@
{{- with .FsType -}} {{- with .FsType -}}
{{ " fstype=" }}{{ . }} {{ " fstype=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Options -}} {{- with .Options -}}
{{ " options=" }}{{ cjoin . }} {{ " options=" }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- with .Source -}} {{- with .Source -}}
{{ " " }}{{ . }} {{ " " }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 4 -}}
{{- with .MountPoint -}} {{- with .MountPoint -}}
{{ " -> " }}{{ . }} {{ " -> " }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 5 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}
@ -27,13 +31,16 @@
{{- with .FsType -}} {{- with .FsType -}}
{{ " fstype=" }}{{ . }} {{ " fstype=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Options -}} {{- with .Options -}}
{{ " options=" }}{{ cjoin . }} {{ " options=" }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- with .MountPoint -}} {{- with .MountPoint -}}
{{ " " }}{{ . }} {{ " " }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 4 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}
@ -43,12 +50,15 @@
{{- with .FsType -}} {{- with .FsType -}}
{{ " fstype=" }}{{ . }} {{ " fstype=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Options -}} {{- with .Options -}}
{{ " options=" }}{{ cjoin . }} {{ " options=" }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- with .MountPoint -}} {{- with .MountPoint -}}
{{ " " }}{{ . }} {{ " " }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 4 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}

View file

@ -8,15 +8,19 @@
{{- with .Access -}} {{- with .Access -}}
{{ " " }}{{ cjoin . }} {{ " " }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Type -}} {{- with .Type -}}
{{ " type=" }}{{ . }} {{ " type=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- with .Label -}} {{- with .Label -}}
{{ " label=" }}{{ . }} {{ " label=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 4 -}}
{{- with .Name -}} {{- with .Name -}}
{{ " " }}{{ . }} {{ " " }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 5 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}

View file

@ -8,12 +8,15 @@
{{- with .OldRoot -}} {{- with .OldRoot -}}
{{ " oldroot=" }}{{ . }} {{ " oldroot=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .NewRoot -}} {{- with .NewRoot -}}
{{ " " }}{{ . }} {{ " " }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- with .TargetProfile -}} {{- with .TargetProfile -}}
{{ " -> " }}{{ . }} {{ " -> " }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 4 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}

View file

@ -8,9 +8,11 @@
{{- with .Access -}} {{- with .Access -}}
{{ " " }}{{ cjoin . }} {{ " " }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Peer -}} {{- with .Peer -}}
{{ " peer=" }}{{ . }} {{ " peer=" }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 3 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}

View file

@ -3,13 +3,12 @@
{{- /* SPDX-License-Identifier: GPL-2.0-only */ -}} {{- /* SPDX-License-Identifier: GPL-2.0-only */ -}}
{{- define "qualifier" -}} {{- define "qualifier" -}}
{{- with .Prefix -}}
{{ . }}
{{- end -}}
{{- if .Audit -}} {{- if .Audit -}}
{{- "audit " -}} {{- "audit " -}}
{{- end -}} {{- end -}}
{{- .Padding 0 -}}
{{- if eq .AccessType "deny" -}} {{- if eq .AccessType "deny" -}}
{{- "deny " -}} {{- "deny " -}}
{{- end -}} {{- end -}}
{{- .Padding 1 -}}
{{- end -}} {{- end -}}

View file

@ -3,5 +3,15 @@
{{- /* SPDX-License-Identifier: GPL-2.0-only */ -}} {{- /* SPDX-License-Identifier: GPL-2.0-only */ -}}
{{- define "rlimit" -}} {{- define "rlimit" -}}
{{ "set rlimit " }}{{ .Key }} {{ .Op }} {{ .Value }}{{ "," }}{{ template "comment" . }} {{- "set rlimit " -}}
{{- end -}} {{- .Key -}}
{{- " " -}}
{{- .Padding 2 -}}
{{- .Op -}}
{{- " " -}}
{{- .Padding 3 -}}
{{- .Value -}}
{{- "," -}}
{{- .Padding 4 -}}
{{- template "comment" . -}}
{{- end -}}

View file

@ -8,12 +8,15 @@
{{- with .Access -}} {{- with .Access -}}
{{ " " }}{{ cjoin . }} {{ " " }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Set -}} {{- with .Set -}}
{{ " set=" }}{{ cjoin . }} {{ " set=" }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- with .Peer -}} {{- with .Peer -}}
{{ " peer=" }}{{ . }} {{ " peer=" }}{{ . }}
{{- end -}} {{- end -}}
{{- "," -}} {{- "," -}}
{{- .Padding 4 -}}
{{- template "comment" . -}} {{- template "comment" . -}}
{{- end -}} {{- end -}}

View file

@ -8,18 +8,23 @@
{{- with .Access -}} {{- with .Access -}}
{{ " " }}{{ cjoin . }} {{ " " }}{{ cjoin . }}
{{- end -}} {{- end -}}
{{- .Padding 2 -}}
{{- with .Type -}} {{- with .Type -}}
{{ " type=" }}{{ . }} {{ " type=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 3 -}}
{{- with .Protocol -}} {{- with .Protocol -}}
{{ " protocol=" }}{{ . }} {{ " protocol=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 4 -}}
{{- with .Address -}} {{- with .Address -}}
{{ " addr=" }}{{ . }} {{ " addr=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 5 -}}
{{- with .Label -}} {{- with .Label -}}
{{ " label=" }}{{ . }} {{ " label=" }}{{ . }}
{{- end -}} {{- end -}}
{{- .Padding 6 -}}
{{- if and .PeerLabel .PeerAddr -}} {{- if and .PeerLabel .PeerAddr -}}
{{ " peer=(label=" }}{{ .PeerLabel }}{{ ", addr="}}{{ .PeerAddr }}{{ ")" }} {{ " peer=(label=" }}{{ .PeerLabel }}{{ ", addr="}}{{ .PeerAddr }}{{ ")" }}
{{- else -}} {{- else -}}