Skip to content

Commit

Permalink
fix: build failed
Browse files Browse the repository at this point in the history
  • Loading branch information
electricface committed Jul 23, 2019
1 parent d571b05 commit 15aa090
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bin/dde-greeter-setter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ func main() {

err = service.Export(dbusPath, m)
if err != nil {
logger.Errorf("failed to export:", err)
logger.Error("failed to export:", err)
return
}

err = service.RequestName(dbusServiceName)
if err != nil {
logger.Errorf("failed to request name:", err)
logger.Error("failed to request name:", err)
return
}
service.SetAutoQuitHandler(time.Second*30, nil)
Expand Down
5 changes: 3 additions & 2 deletions bin/search/data_rw.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"encoding/gob"
"io/ioutil"
"os"

dutils "pkg.deepin.io/lib/utils"
)

Expand All @@ -42,7 +43,7 @@ func writeDatasToFile(datas interface{}, filename string) {

fp, err := os.Create(filename)
if err != nil {
logger.Warning("Open '%s' failed:", err)
logger.Warningf("failed to open %q: %v", filename, err)
return
}
defer fp.Close()
Expand All @@ -59,7 +60,7 @@ func readDatasFromFile(datas interface{}, filename string) bool {

contents, err := ioutil.ReadFile(filename)
if err != nil {
logger.Warning("ReadFile '%s' failed:", err)
logger.Warningf("failed to read file %q: %v", filename, err)
return false
}

Expand Down
2 changes: 1 addition & 1 deletion bluetooth/bluetooth.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (b *Bluetooth) addDevice(dpath dbus.ObjectPath) {
b.adaptersLock.Unlock()

if d.adapter == nil {
logger.Warning("failed to add device %s, not found adapter", dpath)
logger.Warningf("failed to add device %s, not found adapter", dpath)
return
}

Expand Down
4 changes: 2 additions & 2 deletions bluetooth/bluetooth_ifc.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (b *Bluetooth) RemoveDevice(apath, dpath dbus.ObjectPath) *dbus.Error {

err = a.core.RemoveDevice(0, dpath)
if err != nil {
logger.Warning("failed to remove device %q from adapter %q: %v",
logger.Warningf("failed to remove device %q from adapter %q: %v",
dpath, apath, err)
return dbusutil.ToError(err)
}
Expand Down Expand Up @@ -136,7 +136,7 @@ func (b *Bluetooth) SetAdapterPowered(apath dbus.ObjectPath,
if powered {
err := a.core.Discoverable().Set(0, b.config.Discoverable)
if err != nil {
logger.Warning("failed to set discoverable for %s: %v", a, err)
logger.Warningf("failed to set discoverable for %s: %v", a, err)
}
err = a.core.StartDiscovery(0)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion grub2/grub2.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func (grub *Grub2) readEntries() (err error) {
return
}
if len(grub.entries) == 0 {
logger.Warning("there is no menu entry in %s", grubScriptFile)
logger.Warningf("there is no menu entry in %s", grubScriptFile)
}
return
}
Expand Down

0 comments on commit 15aa090

Please sign in to comment.