INNER CODE UNIT · Go

main

edgelesssys/constellation · disk-mapper/cmd/main.go:52

func main() {
	runErr := run()
	if runErr == nil {
		return
	}
	syslogWriter, err := syslog.New(syslog.LOG_EMERG|syslog.LOG_KERN, "disk-mapper")
	if err != nil {
		os.Exit(1)
	}
	_ = syslogWriter.Err(runErr.Error())
	_ = syslogWriter.Emerg("disk-mapper has failed. In most cases, this is due to a misconfiguration or transient error with the infrastructure.")
	time.Sleep(time.Minute) // sleep to allow the message to be written to syslog and seen by the user
	os.Exit(1)
}

func run() error {
	csp := flag.String("csp", "", "Cloud Service Provider the image is running on")
	verbosity := flag.Int("v", 0, logger.CmdLineVerbosityDescription)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…