From 057fc9dcb0a8a3ef57503fdf6f65873e7c29ce39 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 7 Apr 2020 09:52:12 +0200 Subject: [PATCH] add /update/features handler for feature negotiation related to https://github.com/gokrazy/gokrazy/issues/52 --- update.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/update.go b/update.go index 0afc8d6..8d5a9a1 100644 --- a/update.go +++ b/update.go @@ -109,6 +109,12 @@ func nonConcurrentSwitchHandler(newRootPartition int) func(http.ResponseWriter, } func initUpdate() error { + // The /update/features handler is used for negotiation of individual + // feature support (e.g. PARTUUID= support) between the packer and update + // target. + http.HandleFunc("/update/features", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "partuuid,") + }) http.HandleFunc("/update/mbr", nonConcurrentUpdateHandler(rootdev.BlockDevice())) http.HandleFunc("/update/root", nonConcurrentUpdateHandler(rootdev.Partition(rootdev.InactiveRootPartition()))) http.HandleFunc("/update/switch", nonConcurrentSwitchHandler(rootdev.InactiveRootPartition()))