Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion libtailscale/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ func (a *App) runBackend(ctx context.Context, hardwareAttestation bool) error {
paths.AppSharedDir.Store(a.dataDir)
hostinfo.SetOSVersion(a.osVersion())
hostinfo.SetPackage(a.appCtx.GetInstallSource())
deviceModel := a.modelName()
deviceModel := a.deviceName()
if a.isChromeOS() {
deviceModel = "ChromeOS: " + deviceModel
}
hostinfo.SetDeviceModel(deviceModel)
hostinfo.SetHostnameFn(func() (string, error) {
return a.deviceName(), nil
})

type configPair struct {
rcfg *router.Config
Expand Down
4 changes: 2 additions & 2 deletions libtailscale/tailscale.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ func (a *App) osVersion() string {
return version
}

// modelName return the MANUFACTURER + MODEL from
// deviceName returns the user-set name if available, or MANUFACTURER + MODEL from
// android.os.Build.
func (a *App) modelName() string {
func (a *App) deviceName() string {
model, err := a.appCtx.GetDeviceName()
if err != nil {
panic(err)
Expand Down