diff options
author | Garrett D'Amore <garrett@nexenta.com> | 2010-11-15 20:03:27 -0800 |
---|---|---|
committer | Garrett D'Amore <garrett@nexenta.com> | 2010-11-15 20:03:27 -0800 |
commit | 4656d4747c8743290bfbe910c64cd75eb4e4af8d (patch) | |
tree | 241d8b3f0b8796e33937c6a27c670eba002f8f04 /usr/src/lib/libinstzones | |
parent | 60bec29ea42d65ac648c69b0fb189273e286ca57 (diff) | |
download | illumos-joyent-4656d4747c8743290bfbe910c64cd75eb4e4af8d.tar.gz |
420 remove patch (sparse package) support from svr4 pkg
421 libpkg and libadm need to be lint clean
Reviewed by: gwr@nexenta.com
Reviewed by: peter.tribble@gmail.com
Approved by: gwr@nexenta.com
Diffstat (limited to 'usr/src/lib/libinstzones')
-rw-r--r-- | usr/src/lib/libinstzones/common/instzones_lib.h | 3 | ||||
-rw-r--r-- | usr/src/lib/libinstzones/common/zones.c | 29 | ||||
-rw-r--r-- | usr/src/lib/libinstzones/common/zones_locks.c | 42 | ||||
-rw-r--r-- | usr/src/lib/libinstzones/common/zones_strings.h | 8 | ||||
-rw-r--r-- | usr/src/lib/libinstzones/hdrs/instzones_api.h | 1 |
5 files changed, 1 insertions, 82 deletions
diff --git a/usr/src/lib/libinstzones/common/instzones_lib.h b/usr/src/lib/libinstzones/common/instzones_lib.h index a7acdbcf47..c208c5c981 100644 --- a/usr/src/lib/libinstzones/common/instzones_lib.h +++ b/usr/src/lib/libinstzones/common/instzones_lib.h @@ -98,9 +98,6 @@ typedef struct _argArray_t argArray_t; /* this locks all packages, in all zones */ #define LOBJ_PKGADMIN "zone.*/package.*" -/* this locks all patches, in all zones */ -#define LOBJ_PATCHADMIN "zone.*/patch.*" - #define LOCK_OBJECT_MAXLEN 512 #define LOCK_KEY_MAXLEN 37 diff --git a/usr/src/lib/libinstzones/common/zones.c b/usr/src/lib/libinstzones/common/zones.c index dc3a2036b2..9abb397381 100644 --- a/usr/src/lib/libinstzones/common/zones.c +++ b/usr/src/lib/libinstzones/common/zones.c @@ -693,20 +693,6 @@ z_lock_this_zone(ZLOCKS_T a_lflags) } } - /* lock patch administration always */ - - if (a_lflags & ZLOCKS_PATCH_ADMIN) { - b = _z_lock_zone_object(&_z_global_data._z_ObjectLocks, - zoneName, LOBJ_PATCHADMIN, pid, - MSG_ZONES_LCK_THIS_PATCHADM, - ERR_ZONES_LCK_THIS_PATCHADM); - if (!b) { - (void) z_unlock_this_zone(a_lflags); - (void) free(zoneName); - return (B_FALSE); - } - } - (void) free(zoneName); return (B_TRUE); @@ -908,9 +894,6 @@ z_mount_in_lz(char **r_lzMountPoint, char **r_lzRootPath, char *a_zoneName, /* * lofs resolve the non-global zone's root path first in case * its in a path that's been lofs mounted read-only. - * (e.g. This happens when we're tyring to patch a zone in an ABE - * that lives on a filesystem that the ABE shares with the currently - * running BE.) */ z_resolve_lofs(lzRootPath, sizeof (lzRootPath)); @@ -1390,16 +1373,6 @@ z_unlock_this_zone(ZLOCKS_T a_lflags) zoneName = z_get_zonename(); - /* unlock patch administration */ - - if (a_lflags & ZLOCKS_PATCH_ADMIN) { - b = _z_unlock_zone_object(&_z_global_data._z_ObjectLocks, - zoneName, LOBJ_PATCHADMIN, ERR_ZONES_ULK_THIS_PATCH); - if (!b) { - errors = B_TRUE; - } - } - /* unlock package administration */ if (a_lflags & ZLOCKS_PKG_ADMIN) { @@ -1670,7 +1643,7 @@ z_is_zone_branded(char *zoneName) /* * Both "native" and "cluster" are native brands * that use the standard facilities in the areas - * of packaging/installation/patching/update. + * of packaging/installation/update. */ if (streq(brandname, NATIVE_BRAND_NAME) || streq(brandname, CLUSTER_BRAND_NAME)) { diff --git a/usr/src/lib/libinstzones/common/zones_locks.c b/usr/src/lib/libinstzones/common/zones_locks.c index 36db482657..6352e496bc 100644 --- a/usr/src/lib/libinstzones/common/zones_locks.c +++ b/usr/src/lib/libinstzones/common/zones_locks.c @@ -540,31 +540,6 @@ _z_lock_zone(zoneListElement_t *a_zlst, ZLOCKS_T a_lflags) } /* - * acquire patch lock - */ - - if (a_lflags & ZLOCKS_PATCH_ADMIN) { - - /* - * zone and package administration is locked; lock patch - * administration; if the lock cannot be released, stop, - * release the other locks and return an error - */ - - _z_echoDebug(DBG_ZONES_LCK_ZONE_PATCHADM, a_zlst->_zlName, - LOBJ_PATCHADMIN); - - b = _z_lock_zone_object(&a_zlst->_zlLockObjects, - scratchName, LOBJ_PATCHADMIN, (pid_t)0, - MSG_ZONES_LCK_ZONE_PATCHADM, - ERR_ZONES_LCK_ZONE_PATCHADM); - if (b == B_FALSE) { - (void) _z_unlock_zone(a_zlst, a_lflags); - return (b); - } - } - - /* * all locks have been obtained - return success! */ @@ -832,23 +807,6 @@ _z_unlock_zone(zoneListElement_t *a_zlst, ZLOCKS_T a_lflags) scratchName = a_zlst->_zlScratchName == NULL ? a_zlst->_zlName : a_zlst->_zlScratchName; - if (a_lflags & ZLOCKS_PATCH_ADMIN) { - /* - * if locked, unlock patch administration lock - * if the lock cannot be released, continue anyway - */ - - _z_echoDebug(DBG_ZONES_ULK_ZONE_PATCHADM, a_zlst->_zlName, - LOBJ_PATCHADMIN); - - b = _z_unlock_zone_object(&a_zlst->_zlLockObjects, - scratchName, LOBJ_PATCHADMIN, - WRN_ZONES_ULK_ZONE_PATCHADM); - if (b == B_FALSE) { - errors = B_TRUE; - } - } - if (a_lflags & ZLOCKS_PKG_ADMIN) { /* * if locked, unlock package administration lock diff --git a/usr/src/lib/libinstzones/common/zones_strings.h b/usr/src/lib/libinstzones/common/zones_strings.h index 61d928d75b..13fd978c41 100644 --- a/usr/src/lib/libinstzones/common/zones_strings.h +++ b/usr/src/lib/libinstzones/common/zones_strings.h @@ -93,7 +93,6 @@ extern "C" { #define DBG_ZONES_LCK_ZONES_EXIST ILIBSTR("locking all non-global zones defined") #define DBG_ZONES_LCK_ZONES_NOZONES ILIBSTR("no zones locked: no non-global zones exist") #define DBG_ZONES_LCK_ZONES_UNIMP ILIBSTR("no zones locked: zones are not implemented") -#define DBG_ZONES_LCK_ZONE_PATCHADM ILIBSTR("locking patch administration: zone <%s> object <%s>") #define DBG_ZONES_LCK_ZONE_PKGADM ILIBSTR("locking package administration: zone <%s> object <%s>") #define DBG_ZONES_LCK_ZONE_ZONEADM ILIBSTR("locking zone administration: zone <%s> object <%s>") #define DBG_ZONES_MOUNT_IN_LZ_ENTRY ILIBSTR("mount in non-global zone: zone <%s> global-zone path <%s>") @@ -112,7 +111,6 @@ extern "C" { #define DBG_ZONES_ULK_ZONES_EXIST ILIBSTR("unlocking all non-global zones defined") #define DBG_ZONES_ULK_ZONES_NOZONES ILIBSTR("no zones unlocked: no non-global zones exist") #define DBG_ZONES_ULK_ZONES_UNIMP ILIBSTR("no zones unlocked: zones are not implemented") -#define DBG_ZONES_ULK_ZONE_PATCHADM ILIBSTR("unlocking patch administration: zone <%s> object <%s>") #define DBG_ZONES_ULK_ZONE_PKGADM ILIBSTR("unlocking package administration: zone <%s> object <%s>") #define DBG_ZONES_ULK_ZONE_ZONEADM ILIBSTR("unlocking zone administration: zone <%s> object <%s>") #define DBG_ZONES_UNMOUNT_FROM_LZ_ENTRY ILIBSTR("unmount non-global zone: mount point <%s>") @@ -171,16 +169,13 @@ extern "C" { #define ERR_ZONEREADY_DIDNT_READY ILIBSTR("unable to ready zone <%s>: zone failed to transition to ready state") #define ERR_ZONEREADY_EXEC ILIBSTR("unable to ready zone: could not execute zone administration command <%s>: %s") #define ERR_ZONEROOT_NOTDIR ILIBSTR("unable to use temporary mount point <%s> in zone <%s>: %s") -#define ERR_ZONES_LCK_THIS_PATCHADM ILIBSTR("Unable to acquire patch administration lock for this system; try again later") #define ERR_ZONES_LCK_THIS_PKGADM ILIBSTR("Unable to acquire package administration lock for this system; try again later") #define ERR_ZONES_LCK_THIS_ZONEADM ILIBSTR("Unable to acquire zone administration lock for this system; please try again later") #define ERR_ZONES_LCK_ZONES_FAILED ILIBSTR("Unable to acquire lock on non-global zone <%s>: releasing all locks") -#define ERR_ZONES_LCK_ZONE_PATCHADM ILIBSTR("Unable to acquire patch administration lock for zone <%s>; please try again later") #define ERR_ZONES_LCK_ZONE_PKGADM ILIBSTR("Unable to acquire package administration lock for zone <%s>; please try again later") #define ERR_ZONES_LCK_ZONE_ZONEADM ILIBSTR("Unable to acquire zone administration lock for zone <%s>; please try again later") #define ERR_ZONES_NOT_IMPLEMENTED ILIBSTR("error: zones not implemented") #define ERR_ZONES_ULK_THIS_PACKAGE ILIBSTR("Unable to release package administration lock for this system; try again later") -#define ERR_ZONES_ULK_THIS_PATCH ILIBSTR("Unable to release patch administration lock for this system; try again later") #define ERR_ZONES_ULK_THIS_ZONES ILIBSTR("Unable to release zone administration lock for this system; please try again later") #define ERR_ZONE_LIST_EMPTY ILIBSTR("empty zone list specified") #define ERR_ZONE_NAME_ILLEGAL ILIBSTR("illegal zone name %.*s") @@ -197,10 +192,8 @@ extern "C" { */ #define MSG_PROG_ERR ILIBSTR("ERROR: %s") -#define MSG_ZONES_LCK_THIS_PATCHADM ILIBSTR("## Waiting for up to <%ld> seconds for patch administration commands to become available (another user is administering patches)") #define MSG_ZONES_LCK_THIS_PKGADM ILIBSTR("## Waiting for up to <%ld> seconds for package administration commands to become available (another user is administering packages)") #define MSG_ZONES_LCK_THIS_ZONEADM ILIBSTR("## Waiting for up to <%ld> seconds for zone administration commands to become available (another user is administering zones)") -#define MSG_ZONES_LCK_ZONE_PATCHADM ILIBSTR("## Waiting for up to <%ld> seconds for patch administration commands to become available (another user is administering patches on zone <%s>)") #define MSG_ZONES_LCK_ZONE_PKGADM ILIBSTR("## Waiting for up to <%ld> seconds for package administration commands to become available (another user is administering packages on zone <%s>)") #define MSG_ZONES_LCK_ZONE_ZONEADM ILIBSTR("## Waiting for up to <%ld> seconds for zone administration commands to become available (another user is administering zones on zone <%s>)") @@ -209,7 +202,6 @@ extern "C" { * during the normal usage of the products */ -#define WRN_ZONES_ULK_ZONE_PATCHADM ILIBSTR("WARNING: Unable to release patch administration lock for zone <%s>") #define WRN_ZONES_ULK_ZONE_PKGADM ILIBSTR("WARNING: Unable to release package administration lock for zone <%s>") #define WRN_ZONES_ULK_ZONE_ZONEADM ILIBSTR("WARNING: Unable to release zone administration lock for zone <%s>") diff --git a/usr/src/lib/libinstzones/hdrs/instzones_api.h b/usr/src/lib/libinstzones/hdrs/instzones_api.h index 7ff3a649e4..b145b0dc5f 100644 --- a/usr/src/lib/libinstzones/hdrs/instzones_api.h +++ b/usr/src/lib/libinstzones/hdrs/instzones_api.h @@ -80,7 +80,6 @@ typedef unsigned long ZLOCKS_T; #define ZLOCKS_ZONE_ADMIN ((ZLOCKS_T)0x00000001) /* zone admin */ #define ZLOCKS_PKG_ADMIN ((ZLOCKS_T)0x00000002) /* package admin */ -#define ZLOCKS_PATCH_ADMIN ((ZLOCKS_T)0x00000004) /* patch admin */ #define ZLOCKS_ALL ((ZLOCKS_T)0xFFFFFFFF) /* all locks */ #define ZLOCKS_NONE ((ZLOCKS_T)0x00000000) /* no locks */ |