diff options
Diffstat (limited to 'vendor/github.com')
-rw-r--r-- | vendor/github.com/coreos/go-systemd/v22/dbus/methods.go | 21 | ||||
-rw-r--r-- | vendor/github.com/coreos/go-systemd/v22/sdjournal/journal.go | 5 |
2 files changed, 4 insertions, 22 deletions
diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go b/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go index 01879ba15..679f244e8 100644 --- a/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go @@ -24,18 +24,6 @@ import ( "github.com/godbus/dbus/v5" ) -// Who can be used to specify which process to kill in the unit via the KillUnitWithTarget API -type Who string - -const ( - // All sends the signal to all processes in the unit - All Who = "all" - // Main sends the signal to the main process of the unit - Main Who = "main" - // Control sends the signal to the control process of the unit - Control Who = "control" -) - func (c *Conn) jobComplete(signal *dbus.Signal) { var id uint32 var job dbus.ObjectPath @@ -208,12 +196,7 @@ func (c *Conn) KillUnit(name string, signal int32) { // KillUnitContext same as KillUnit with context func (c *Conn) KillUnitContext(ctx context.Context, name string, signal int32) { - c.KillUnitWithTarget(ctx, name, All, signal) -} - -// KillUnitWithTarget is like KillUnitContext, but allows you to specify which process in the unit to send the signal to -func (c *Conn) KillUnitWithTarget(ctx context.Context, name string, target Who, signal int32) error { - return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.KillUnit", 0, name, string(target), signal).Store() + c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.KillUnit", 0, name, "all", signal).Store() } // ResetFailedUnit resets the "failed" state of a specific unit. @@ -377,7 +360,7 @@ func (c *Conn) SetUnitPropertiesContext(ctx context.Context, name string, runtim // Deprecated: use GetUnitTypePropertyContext instead func (c *Conn) GetUnitTypeProperty(unit string, unitType string, propertyName string) (*Property, error) { - return c.GetUnitTypePropertyContext(context.Background(), unit, unitType, propertyName) + return c.GetUnitTypePropertyContext(context.Background(), unitType, unitType, propertyName) } // GetUnitTypePropertyContext same as GetUnitTypeProperty with context diff --git a/vendor/github.com/coreos/go-systemd/v22/sdjournal/journal.go b/vendor/github.com/coreos/go-systemd/v22/sdjournal/journal.go index 344016ebe..c61a2025f 100644 --- a/vendor/github.com/coreos/go-systemd/v22/sdjournal/journal.go +++ b/vendor/github.com/coreos/go-systemd/v22/sdjournal/journal.go @@ -310,7 +310,7 @@ package sdjournal // } // // char * -// my_sd_id128_to_string(void *f, sd_id128_t boot_id, char s[SD_ID128_STRING_MAX]) +// my_sd_id128_to_string(void *f, sd_id128_t boot_id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]) // { // char *(*sd_id128_to_string)(sd_id128_t, char *); // @@ -1155,8 +1155,7 @@ func (j *Journal) GetBootID() (string, error) { return "", err } - id128StringMax := C.ulong(C.SD_ID128_STRING_MAX) - c := (*C.char)(C.malloc(id128StringMax)) + c := (*C.char)(C.malloc(33)) defer C.free(unsafe.Pointer(c)) C.my_sd_id128_to_string(sd_id128_to_string, boot_id, c) |