Skip to content

Commit

Permalink
Merge pull request #34 from nemomobile/jb22308
Browse files Browse the repository at this point in the history
Drop boardname support from ssu
  • Loading branch information
saukko committed Jan 23, 2015
2 parents 5325fcf + 22dd2dc commit 0b1a248
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 217 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,3 +10,4 @@ doc/latex
/rndssucli/ssuproxy.cpp
/rndssucli/ssuproxy.h
/.nodocs
ssucli/ssuproxy.h
4 changes: 0 additions & 4 deletions board-mappings.ini
Expand Up @@ -13,10 +13,6 @@
#
# Valid categories for determining the model:
# - file.exists -- checks for existince of a file in the filesystem
# - boardname.equals -- compares with boardname
# - boardname.contains -- searches for substring in boardname
# NOTE: only use boardname if none of the other options match
# use the boardname command to set/check the current value
# - hwrelease.device -- Compares MER_HA_DEVICE in /etc/hw-release
# - cpuinfo.contains -- searches /proc/cpuinfo for a string
# - uname-release.contains -- searches the kernels release string for
Expand Down
2 changes: 1 addition & 1 deletion libssu/libssu.pro
Expand Up @@ -29,7 +29,7 @@ SOURCES = \

CONFIG += link_pkgconfig
QT += network xml dbus
PKGCONFIG += libsystemd-journal boardname libshadowutils
PKGCONFIG += libsystemd-journal libshadowutils

install_headers.files = $${public_headers}

Expand Down
32 changes: 0 additions & 32 deletions libssu/ssudeviceinfo.cpp
Expand Up @@ -15,10 +15,6 @@

#include <sys/utsname.h>

extern "C" {
#include <boardname.h>
}

#include "sandbox_p.h"
#include "ssudeviceinfo.h"
#include "ssucoreconfig.h"
Expand Down Expand Up @@ -157,7 +153,6 @@ QString SsuDeviceInfo::deviceModel(){
QDir dir;
QFile procCpuinfo;
QStringList keys;
QStringList sections;

if (!cachedModel.isEmpty())
return cachedModel;
Expand All @@ -176,33 +171,6 @@ QString SsuDeviceInfo::deviceModel(){
boardMappings->endGroup();
if (!cachedModel.isEmpty()) return cachedModel;

// check if boardname matches/contains
QString boardName(getboardname());
boardName = boardName.trimmed();
sections.clear();
sections << "boardname.equals" << "boardname.contains";
foreach (const QString &section, sections){
boardMappings->beginGroup(section);
keys = boardMappings->allKeys();
foreach (const QString &key, keys){
QString value = boardMappings->value(key).toString();
if (section.endsWith(".contains")){
if (boardName.contains(value)){
cachedModel = key;
break;
}
} else if (section.endsWith(".equals")){
if (boardName == value){
cachedModel = key;
break;
}
}
}
boardMappings->endGroup();
if (!cachedModel.isEmpty()) break;
}
if (!cachedModel.isEmpty()) return cachedModel;

// check if the device can be identified by a string in /proc/cpuinfo
procCpuinfo.setFileName(Sandbox::map("/proc/cpuinfo"));
procCpuinfo.open(QIODevice::ReadOnly | QIODevice::Text);
Expand Down
3 changes: 1 addition & 2 deletions rpm/ssu.spec
@@ -1,12 +1,11 @@
Name: ssu
Version: 0.39.6
Version: 0.40.5
Release: 1
Summary: SSU enabler for RND
Group: System/Base
License: GPLv2
Source0: %{name}-%{version}.tar.gz
URL: https://github.com/nemomobile/ssu
BuildRequires: pkgconfig(boardname)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Network)
Expand Down
178 changes: 0 additions & 178 deletions ssucli/ssuproxy.h

This file was deleted.

0 comments on commit 0b1a248

Please sign in to comment.