Back to index

lshw  02.16
Defines | Functions
pcmcia.cc File Reference
#include "version.h"
#include "pcmcia.h"
#include "osutils.h"
#include "sysfs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <dirent.h>

Go to the source code of this file.

Defines

#define SYS_CLASS_PCMCIASOCKET   "/sys/class/pcmcia_socket"
#define CLASS_PCMCIASOCKET   "pcmcia_socket"

Functions

 __ID ("@(#) $Id$")
bool scan_pcmcia (hwNode &n)

Define Documentation

#define CLASS_PCMCIASOCKET   "pcmcia_socket"

Definition at line 18 of file pcmcia.cc.

#define SYS_CLASS_PCMCIASOCKET   "/sys/class/pcmcia_socket"

Definition at line 17 of file pcmcia.cc.


Function Documentation

__ID ( "@(#) $Id$"  )
bool scan_pcmcia ( hwNode n)

Definition at line 20 of file pcmcia.cc.

{
  bool result = false;
  hwNode *core = n.getChild("core");
  int count = 0;
  dirent **sockets = NULL;

  return result;

  if (!core)
  {
    n.addChild(hwNode("core", hw::bus));
    core = n.getChild("core");
  }

  if(!pushd(SYS_CLASS_PCMCIASOCKET))
    return false;

  count = scandir(".", &sockets, NULL, alphasort);
  if(count>=0)
  {
    for(int i=0; i<count; i++)
    {
      if(matches(sockets[i]->d_name, "^pcmcia_socket[[:digit:]]+$"))
      {
        sysfs::entry socket = sysfs::entry::byClass(CLASS_PCMCIASOCKET, sockets[i]->d_name);
        printf("found PCMCIA socket: %s\n", sockets[i]->d_name);
      }
      free(sockets[i]);
    }
    free(sockets);
  }

  popd();
  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function: