Back to index

lshw  02.16
Classes | Defines | Functions File Reference
#include "hw.h"
#include "osutils.h"
#include "version.h"
#include "config.h"
#include "options.h"
#include "heuristics.h"
#include "dump.h"
#include "db.h"
#include <cstring>
#include <vector>
#include <map>
#include <sstream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <unistd.h>
#include <sys/utsname.h>

Go to the source code of this file.


struct  hwNode_i
struct  hw::resource_i
struct  hw::value_i




 __ID ("@(#) $Id: 2433 2012-01-10 22:01:30Z lyonel $")
static string cleanupId (const string &id)
static string generateId (const string &radical, int count)

Class Documentation

struct hwNode_i

Definition at line 27 of file

Collaboration diagram for hwNode_i:
Class Members
vector< string > attracted
string businfo
unsigned long long capacity
vector< hwNode > children
bool claimed
unsigned long long clock
map< string, string > config
string date
string description
string dev
hwClass deviceclass
bool enabled
vector< string > features
map< string, string > features_descriptions
string handle
map< string, value > hints
string id
vector< string > logicalnames
string physid
string product
vector< resource > resources
string serial
unsigned long long size
string slot
unsigned long long start
string vendor
string version
unsigned int width
struct hw::resource_i

Definition at line 1979 of file

Class Members
bool b
int refcount
hwResourceType type
unsigned int ui1
unsigned long ul1
unsigned long ul2
unsigned long long ull1
unsigned long long ull2
struct hw::value_i

Definition at line 2216 of file

Collaboration diagram for hw::value_i:
Class Members
bool b
long long ll
int refcount
string s
hwValueType type

Define Documentation


Definition at line 1 of file

Function Documentation

__ID ( "@(#) $Id: 2433 2012-01-10 22:01:30Z lyonel $"  )
static string cleanupId ( const string &  id) [static]

Definition at line 82 of file

  string result = strip(id);

  for (unsigned int i = 0; i < result.length(); i++)
    result[i] = tolower(result[i]);
    if (!strchr("0123456789abcdefghijklmnopqrstuvwxyz_.:-", result[i]))
      result[i] = '_';

  return result;

Here is the call graph for this function:

Here is the caller graph for this function:

static string generateId ( const string &  radical,
int  count 
) [static]

Definition at line 742 of file

  char buffer[10];

  snprintf(buffer, sizeof(buffer), "%d", count);

  return radical + ":" + string(buffer);

Here is the caller graph for this function: