!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/acorn/char/   drwxr-xr-x
Free 318.33 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     serial-card.c (2.89 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 *  linux/drivers/acorn/char/serial-card.c
 *
 *  Copyright (C) 1996-1999 Russell King.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * A generic handler of serial expansion cards that use 16550s or
 * the like.
 *
 * Definitions:
 *  MY_PRODS        Product numbers to identify this card by
 *  MY_MANUS        Manufacturer numbers to identify this card by
 *  MY_NUMPORTS        Number of ports per card
 *  MY_BAUD_BASE    Baud base for the card
 *  MY_INIT        Initialisation routine name
 *  MY_BASE_ADDRESS(ec)    Return base address for ports
 *  MY_PORT_ADDRESS
 *    (port,cardaddr)    Return address for port using base address
 *            from above.
 *
 * Changelog:
 *  30-07-1996    RMK    Created
 *  22-04-1998    RMK    Removed old register_pre_init_serial
 */
#include <linux/module.h>
#include <linux/types.h>
#include <linux/serial.h>
#include <linux/errno.h>
#include <linux/init.h>

#include <asm/ecard.h>
#include <asm/string.h>

#ifndef NUM_SERIALS
#define NUM_SERIALS    MY_NUMPORTS * MAX_ECARDS
#endif

#ifdef MODULE
static int __serial_ports[NUM_SERIALS];
static int __serial_pcount;
static int __serial_addr[NUM_SERIALS];
static struct expansion_card *expcard[MAX_ECARDS];
#define ADD_ECARD(ec,card) expcard[(card)] = (ec)
#define ADD_PORT(port,addr)                    \
    do {                            \
        __serial_ports[__serial_pcount] = (port);    \
        __serial_addr[__serial_pcount] = (addr);    \
        __serial_pcount += 1;                \
    } while (0)
#else
#define ADD_ECARD(ec,card)
#define ADD_PORT(port,addr)
#endif

static const card_ids serial_cids[] = { MY_CARD_LIST, { 0xffff, 0xffff } };

static inline int serial_register_onedev (unsigned long port, int irq)
{
    struct serial_struct req;

    memset(&req, 0, sizeof(req));
    req.baud_base = MY_BAUD_BASE;
    req.irq = irq;
    req.port = port;
    req.flags = 0;

    return register_serial(&req);
}

static int __init INIT (void)
{
    int card = 0;

    ecard_startfind ();

    do {
    struct expansion_card *ec;
    unsigned long cardaddr;
    int port;

    ec = ecard_find (0, serial_cids);
    if (!ec)
        break;

    cardaddr = MY_BASE_ADDRESS(ec);

    for (port = 0; port < MY_NUMPORTS; port ++) {
        unsigned long address;
        int line;

        address = MY_PORT_ADDRESS(port, cardaddr);

        line = serial_register_onedev (address, ec->irq);
        if (line < 0)
        break;
        ADD_PORT(line, address);
    }

    if (port) {
        ecard_claim (ec);
        ADD_ECARD(ec, card);
    } else
        break;
    } while (++card < MAX_ECARDS);
    return card ? 0 : -ENODEV;
}

static void __exit EXIT (void)
{
#ifdef MODULE
    int i;

    for (i = 0; i < __serial_pcount; i++) {
    unregister_serial(__serial_ports[i]);
    release_region(__serial_addr[i], 8);
    }

    for (i = 0; i < MAX_ECARDS; i++)
    if (expcard[i])
        ecard_release (expcard[i]);
#endif
}

EXPORT_NO_SYMBOLS;

MODULE_LICENSE("GPL");

module_init(INIT);
module_exit(EXIT);

:: 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 ]--