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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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