Back to index

lshw  02.16
Defines | Functions
abi.cc File Reference
#include "version.h"
#include "config.h"
#include "abi.h"
#include "osutils.h"
#include <unistd.h>
#include <stdlib.h>
#include <dirent.h>

Go to the source code of this file.

Defines

#define PROC_SYS   "/proc/sys"

Functions

 __ID ("@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $")
bool scan_abi (hwNode &system)

Define Documentation

#define PROC_SYS   "/proc/sys"

Definition at line 17 of file abi.cc.


Function Documentation

__ID ( "@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $"  )
bool scan_abi ( hwNode system)

Definition at line 19 of file abi.cc.

{
  // are we compiled as 32- or 64-bit process ?
  system.setWidth(sysconf(_SC_LONG_BIT));

  pushd(PROC_SYS);

  if(exists("kernel/vsyscall64"))
  {
    system.addCapability("vsyscall64");
    system.setWidth(64);
  }

  if(chdir("abi") == 0)
  {
    int i,n;
    struct dirent **namelist;

    n = scandir(".", &namelist, selectfile, alphasort);
    for(i=0; i<n; i++)
    {
      system.addCapability(namelist[i]->d_name);
      free(namelist[i]);
    }
    if(namelist)
      free(namelist);
  }

  popd();

  system.describeCapability("vsyscall32", _("32-bit processes"));
  system.describeCapability("vsyscall64", _("64-bit processes"));
  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function: