From 77806494c81fb0e62deccd7fa7ddbaa7e990399a Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 18 Aug 2018 14:27:43 +0100 Subject: [PATCH] mount,cmount: adapt to sdnotify API change --- cmd/cmount/mount.go | 4 ++-- cmd/mount/mount.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 8bfd13c28..9aa0b0a71 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -213,7 +213,7 @@ func Mount(f fs.Fs, mountpoint string) error { sigHup := make(chan os.Signal, 1) signal.Notify(sigHup, syscall.SIGHUP) - if err := sdnotify.SdNotifyReady(); err != nil && err != sdnotify.SdNotifyNoSocket { + if err := sdnotify.Ready(); err != nil && err != sdnotify.ErrSdNotifyNoSocket { return errors.Wrap(err, "failed to notify systemd") } @@ -234,7 +234,7 @@ waitloop: } } - _ = sdnotify.SdNotifyStopping() + _ = sdnotify.Stopping() if err != nil { return errors.Wrap(err, "failed to umount FUSE fs") } diff --git a/cmd/mount/mount.go b/cmd/mount/mount.go index bbde3076e..9240c66d2 100644 --- a/cmd/mount/mount.go +++ b/cmd/mount/mount.go @@ -140,7 +140,7 @@ func Mount(f fs.Fs, mountpoint string) error { signal.Notify(sigHup, syscall.SIGHUP) atexit.IgnoreSignals() - if err := sdnotify.SdNotifyReady(); err != nil && err != sdnotify.SdNotifyNoSocket { + if err := sdnotify.Ready(); err != nil && err != sdnotify.ErrSdNotifyNoSocket { return errors.Wrap(err, "failed to notify systemd") } @@ -165,7 +165,7 @@ waitloop: } } - _ = sdnotify.SdNotifyStopping() + _ = sdnotify.Stopping() if err != nil { return errors.Wrap(err, "failed to umount FUSE fs") }