aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/diff/engine.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-02-03 17:53:46 +0100
committerAndreas Fischer <bantu@phpbb.com>2015-02-03 17:53:46 +0100
commit5347eac69cfd0946dadfc6c2f3cb71709ca1895c (patch)
tree29f23d62abd43db509a1deeee030ceefc02b36bb /phpBB/includes/diff/engine.php
parent2864e77d6c480f8424de962dd0570185c049a9af (diff)
parenta5c65449deb98d752a4c0da86724230b4b879179 (diff)
downloadforums-5347eac69cfd0946dadfc6c2f3cb71709ca1895c.tar
forums-5347eac69cfd0946dadfc6c2f3cb71709ca1895c.tar.gz
forums-5347eac69cfd0946dadfc6c2f3cb71709ca1895c.tar.bz2
forums-5347eac69cfd0946dadfc6c2f3cb71709ca1895c.tar.xz
forums-5347eac69cfd0946dadfc6c2f3cb71709ca1895c.zip
Merge pull request #3328 from marc1706/ticket/13538
[ticket/13538] Add tests for pagination in nested loops * marc1706/ticket/13538: [ticket/13538] Add tests for double nested pagination loop [ticket/13538] Fix tests for pagination in nested loop [ticket/13538] Add test for pagination in nested loop
Diffstat (limited to 'phpBB/includes/diff/engine.php')
0 files changed, 0 insertions, 0 deletions
' href='#n56'>56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/conf.h>
#include <sun/vddrv.h>

extern struct streamtab pppinfo;
extern int ppp_count;
extern int nchrdev;

static struct vdldrv vd = {
    VDMAGIC_PSEUDO,
    "ppp"
};

extern int nodev();

static struct cdevsw ppp_cdevsw = {
    nodev, nodev, nodev, nodev, nodev, nodev, nodev, 0,
    &pppinfo
};

static struct cdevsw old_entry;

int
ppp_vdcmd(fun, vdp, vdi, vds)
    unsigned int fun;
    struct vddrv *vdp;
    addr_t vdi;
    struct vdstat *vds;
{
    static int majnum = -1;
    int n, maj;

    switch (fun) {
    case VDLOAD:
	/*
	 * It seems like modload doesn't install the cdevsw entry
	 * for us.  Oh well...
	 */
	for (maj = 1; maj < nchrdev; ++maj)
	    if (cdevsw[maj].d_open == vd_unuseddev)
		break;
	if (maj >= nchrdev)
	    return ENODEV;
	vd.Drv_charmajor = maj;
	old_entry = cdevsw[maj];
	cdevsw[maj] = ppp_cdevsw;
	vd.Drv_cdevsw = &ppp_cdevsw;
	vdp->vdd_vdtab = (struct vdlinkage *) &vd;
	majnum = maj;
	break;

    case VDUNLOAD:
	if (ppp_count > 0)
	    return EBUSY;
	if (vd.Drv_charmajor > 0)
	    cdevsw[vd.Drv_charmajor] = old_entry;
	break;

    case VDSTAT:
	/*
	 * We have to fool the modstat command into thinking
	 * that this module is actually a driver! This is
	 * so that installation commands that use the -exec
	 * option of modload to run a shell script find out
	 * the block and/or char major numbers of the driver
	 * loaded (so that the shell script can go off to
	 * /dev and *MAKE* the bloody device nodes- remember
	 * they might change from one load to another if
	 * you don't hardwire the number!).
	 */
	vds->vds_magic = VDMAGIC_DRV;
	vds->vds_modinfo[0] = (char) 0;
	vds->vds_modinfo[1] = (char) majnum;
	break;

    default:
	return EIO;
    }
    return 0;
}