diff options
author | sl108498 <none@none> | 2007-02-16 15:39:38 -0800 |
---|---|---|
committer | sl108498 <none@none> | 2007-02-16 15:39:38 -0800 |
commit | 52978630c494bee8d54ed3f55387ab291818be9d (patch) | |
tree | 9735f395fc4a6fdb39dbd0a8b2985435993d6932 /usr/src/cmd/perl/contrib/Sun/Solaris/Project | |
parent | 535ec645ca371f1ce298eaf76bf8feb73494f923 (diff) | |
download | illumos-gate-52978630c494bee8d54ed3f55387ab291818be9d.tar.gz |
6500376 projdel from SUNWesu in SUNWCreq in s10/snv has missing dependency
6516822 Zone may shutdown without completing the final dance
6524250 panic: assertion failed: (*first)->vmb_start >= new_next->vmb_start, file: ../../common/vm/vm_usage.
Diffstat (limited to 'usr/src/cmd/perl/contrib/Sun/Solaris/Project')
-rw-r--r-- | usr/src/cmd/perl/contrib/Sun/Solaris/Project/Makefile.PL | 9 | ||||
-rw-r--r-- | usr/src/cmd/perl/contrib/Sun/Solaris/Project/Project.xs | 34 |
2 files changed, 34 insertions, 9 deletions
diff --git a/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Makefile.PL b/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Makefile.PL index 3a5783bb76..e606807b87 100644 --- a/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Makefile.PL +++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Makefile.PL @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" @@ -84,7 +83,7 @@ if (! exists($ENV{CODEMGR_WS})) { WriteMakefile( NAME => 'Sun::Solaris::Project', VERSION_FROM => 'Project.pm', - LIBS => [ '-lproject -lpool -lgen' ], + LIBS => '-lproject -lgen', @defines, @man3pods, ); diff --git a/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Project.xs b/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Project.xs index f401e07383..868f0bebcf 100644 --- a/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Project.xs +++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Project.xs @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * Project.xs contains XS wrappers for the project database maniplulation @@ -30,8 +29,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" /* Solaris includes. */ +#include <zone.h> #include <project.h> #include <pool.h> +#include <sys/pool_impl.h> #include <rctl.h> #include <stdio.h> @@ -354,7 +355,32 @@ pool_exists(name) PREINIT: pool_conf_t *conf; pool_t *pool; + pool_status_t status; + int fd; PPCODE: + + /* + * Determine if pools are enabled using /dev/pool directly, as + * libpool may not be present. + */ + if (getzoneid() != GLOBAL_ZONEID) { + XSRETURN_IV(1); + } + if ((fd = open("/dev/pool", O_RDONLY)) < 0) { + XSRETURN_IV(1); + } + if (ioctl(fd, POOL_STATUSQ, &status) < 0) { + (void) close(fd); + XSRETURN_IV(1); + } + close(fd); + if (status.ps_io_state != 1) { + XSRETURN_IV(1); + } + + /* + * If pools are enabled, assume libpool is present. + */ conf = pool_conf_alloc(); if (conf == NULL) { XSRETURN_IV(1); |