From fd7320aaa194ce284d0658cc2c1fc6e815c6f0cb Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 21 May 2020 14:34:13 +0200 Subject: [PATCH] osbuild/fstab: add filesystem label support Exactly one of the UUID or the label must be set. The helpers are kept the same and only supports the UUID for now, but these should likely be dropped in favor of open-coding the structs anyway. We do not enforce that the UUID or label is set, but osbuild will. Signed-off-by: Tom Gundersen --- internal/osbuild/fstab_stage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/osbuild/fstab_stage.go b/internal/osbuild/fstab_stage.go index 8c0d6fc1c..4bf679218 100644 --- a/internal/osbuild/fstab_stage.go +++ b/internal/osbuild/fstab_stage.go @@ -22,7 +22,8 @@ func NewFSTabStage(options *FSTabStageOptions) *Stage { // An FSTabEntry represents one line in /etc/fstab. With the one exception // that the the spec field must be represented as an UUID. type FSTabEntry struct { - UUID string `json:"uuid"` + UUID string `json:"uuid,omitempty"` + Label string `json:"label,omitempty"` VFSType string `json:"vfs_type"` Path string `json:"path,omitempty"` Options string `json:"options,omitempty"`