!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/src/linux-2.4.18-xfs-1.1/drivers/pci/   drwxr-xr-x
Free 318.37 GB of 458.09 GB (69.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     names.c (3.01 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 *    PCI Class and Device Name Tables
 *
 *    Copyright 1993--1999 Drew Eckhardt, Frederic Potter,
 *    David Mosberger-Tang, Martin Mares
 */

#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/init.h>

#ifdef CONFIG_PCI_NAMES

struct pci_device_info {
    unsigned short device;
    unsigned short seen;
    const char *name;
};

struct pci_vendor_info {
    unsigned short vendor;
    unsigned short nr;
    const char *name;
    struct pci_device_info *devices;
};

/*
 * This is ridiculous, but we want the strings in
 * the .init section so that they don't take up
 * real memory.. Parse the same file multiple times
 * to get all the info.
 */
#define VENDOR( vendor, name )        static char __vendorstr_##vendor[] __initdata = name;
#define ENDVENDOR()
#define DEVICE( vendor, device, name )     static char __devicestr_##vendor##device[] __initdata = name;
#include "devlist.h"


#define VENDOR( vendor, name )        static struct pci_device_info __devices_##vendor[] __initdata = {
#define ENDVENDOR()            };
#define DEVICE( vendor, device, name )    { 0x##device, 0, __devicestr_##vendor##device },
#include "devlist.h"

static struct pci_vendor_info __initdata pci_vendor_list[] = {
#define VENDOR( vendor, name )        { 0x##vendor, sizeof(__devices_##vendor) / sizeof(struct pci_device_info), __vendorstr_##vendor, __devices_##vendor },
#define ENDVENDOR()
#define DEVICE( vendor, device, name )
#include "devlist.h"
};

#define VENDORS (sizeof(pci_vendor_list)/sizeof(struct pci_vendor_info))

void __devinit pci_name_device(struct pci_dev *dev)
{
    const struct pci_vendor_info *vendor_p = pci_vendor_list;
    int i = VENDORS;
    char *name = dev->name;

    do {
        if (vendor_p->vendor == dev->vendor)
            goto match_vendor;
        vendor_p++;
    } while (--i);

    /* Couldn't find either the vendor nor the device */
    sprintf(name, "PCI device %04x:%04x", dev->vendor, dev->device);
    return;

    match_vendor: {
        struct pci_device_info *device_p = vendor_p->devices;
        int i = vendor_p->nr;

        while (i > 0) {
            if (device_p->device == dev->device)
                goto match_device;
            device_p++;
            i--;
        }

        /* Ok, found the vendor, but unknown device */
        sprintf(name, "PCI device %04x:%04x (%s)", dev->vendor, dev->device, vendor_p->name);
        return;

        /* Full match */
        match_device: {
            char *n = name + sprintf(name, "%s %s", vendor_p->name, device_p->name);
            int nr = device_p->seen + 1;
            device_p->seen = nr;
            if (nr > 1)
                sprintf(n, " (#%d)", nr);
        }
    }
}

/*
 *  Class names. Not in .init section as they are needed in runtime.
 */

static u16 pci_class_numbers[] = {
#define CLASS(x,y) 0x##x,
#include "classlist.h"
};

static char *pci_class_names[] = {
#define CLASS(x,y) y,
#include "classlist.h"
};

char *
pci_class_name(u32 class)
{
    int i;

    for(i=0; i<sizeof(pci_class_numbers)/sizeof(pci_class_numbers[0]); i++)
        if (pci_class_numbers[i] == class)
            return pci_class_names[i];
    return NULL;
}

#else

void __init pci_name_device(struct pci_dev *dev)
{
}

char *
pci_class_name(u32 class)
{
    return NULL;
}

#endif /* CONFIG_PCI_NAMES */


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0047 ]--