From 47e61bc9672025d7648dafedb45734868263ed71 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Thu, 30 Aug 2018 10:33:44 -0400 Subject: [PATCH] uadmin: remove obsolete AD_FORCE define It became obsolete in 2007. --- bin/uadmin/uadmin.c | 7 +------ include/sys/cpr.h | 1 - include/sys/uadmin.h | 2 -- kernel/cpr/cpr_mod.c | 1 - kernel/cpr/cpr_uthread.c | 3 +-- share/man/man2/uadmin.2 | 14 -------------- usr/src/lib/libbsm/common/adt.xml | 2 -- 7 files changed, 2 insertions(+), 28 deletions(-) diff --git a/bin/uadmin/uadmin.c b/bin/uadmin/uadmin.c index 38585b8713..6ca8d8b5dc 100644 --- a/bin/uadmin/uadmin.c +++ b/bin/uadmin/uadmin.c @@ -173,9 +173,6 @@ main(int argc, char *argv[]) case AD_CHECK_SUSPEND_TO_DISK: fcn_id = ADT_UADMIN_FCN_AD_CHECK_SUSPEND_TO_DISK; break; - case AD_FORCE: - fcn_id = ADT_UADMIN_FCN_AD_FORCE; - break; case AD_SUSPEND_TO_RAM: fcn_id = ADT_UADMIN_FCN_AD_SUSPEND_TO_RAM; break; @@ -284,8 +281,7 @@ main(int argc, char *argv[]) /* If returning from a suspend, audit thaw */ if ((cmd == A_FREEZE) && - ((fcn == AD_FORCE) || - (fcn == AD_REUSABLE) || + ((fcn == AD_REUSABLE) || (fcn == AD_SUSPEND_TO_DISK) || (fcn == AD_SUSPEND_TO_RAM))) { if ((event = adt_alloc_event(ah, ADT_uadmin_thaw)) == NULL) { @@ -342,7 +338,6 @@ closeout_audit(int cmd, int fcn) case AD_REUSABLE: case AD_SUSPEND_TO_DISK: case AD_SUSPEND_TO_RAM: - case AD_FORCE: /* suspend the system, change audit files */ return (change_audit_file()); default: diff --git a/include/sys/cpr.h b/include/sys/cpr.h index 2dcfb93b9d..8923b2338c 100644 --- a/include/sys/cpr.h +++ b/include/sys/cpr.h @@ -394,7 +394,6 @@ typedef struct cpr_terminator ctrm_t; * redefinitions of uadmin subcommands for A_FREEZE */ #define AD_CPR_COMPRESS AD_SUSPEND_TO_DISK /* store state file compressed */ -#define AD_CPR_FORCE AD_FORCE /* force to do AD_CPR_COMPRESS */ #define AD_CPR_CHECK AD_CHECK_SUSPEND_TO_DISK /* test if CPR module is there */ #define AD_CPR_REUSEINIT AD_REUSEINIT /* write cprinfo file */ #define AD_CPR_REUSABLE AD_REUSABLE /* create reusable statefile */ diff --git a/include/sys/uadmin.h b/include/sys/uadmin.h index 7edd65d7eb..3e01bbd85b 100644 --- a/include/sys/uadmin.h +++ b/include/sys/uadmin.h @@ -66,11 +66,9 @@ extern "C" { /* * Functions reserved for A_FREEZE (may not be available on all platforms) - * Note: AD_FORCE should not be used by any new application */ #define AD_SUSPEND_TO_DISK 0 /* A_FREEZE, CPR or ACPI S4 */ -#define AD_FORCE 1 /* force to do AD_SUSPEND_TO_DISK */ #define AD_CHECK_SUSPEND_TO_DISK 2 /* A_FREEZE, CPR/S4 capable? */ #define AD_SUSPEND_TO_RAM 20 /* A_FREEZE, S3 */ #define AD_CHECK_SUSPEND_TO_RAM 21 /* A_FREEZE, S3 capable? */ diff --git a/kernel/cpr/cpr_mod.c b/kernel/cpr/cpr_mod.c index e7b6b7ddde..8f4b6ce592 100644 --- a/kernel/cpr/cpr_mod.c +++ b/kernel/cpr/cpr_mod.c @@ -139,7 +139,6 @@ cpr(int fcn, void *mdep) case AD_SUSPEND_TO_DISK: case AD_CPR_REUSEINIT: case AD_CPR_NOCOMPRESS: - case AD_CPR_FORCE: case AD_CPR_REUSABLE: case AD_CPR_REUSEFINI: case AD_CPR_TESTZ: diff --git a/kernel/cpr/cpr_uthread.c b/kernel/cpr/cpr_uthread.c index edf373736c..4deaa04bfa 100644 --- a/kernel/cpr/cpr_uthread.c +++ b/kernel/cpr/cpr_uthread.c @@ -86,8 +86,7 @@ cpr_stop_user_threads() if (++count > CPR_UTSTOP_RETRY) return (ESRCH); cpr_stop_user(count * count * CPR_UTSTOP_WAIT); - } while (cpr_check_user_threads() && - (count < CPR_UTSTOP_RETRY || CPR->c_fcn != AD_CPR_FORCE)); + } while (cpr_check_user_threads()); return (0); } diff --git a/share/man/man2/uadmin.2 b/share/man/man2/uadmin.2 index 5861051a3b..dac3657e12 100644 --- a/share/man/man2/uadmin.2 +++ b/share/man/man2/uadmin.2 @@ -167,20 +167,6 @@ suspend/resume, this subcommand checks if this feature is currently available on your system. .RE -The following subcommands, specified by \fIfcn\fR, are obsolete and might be -removed in a subsequent release: -.sp -.ne 2 -.na -\fB\fBAD_FORCE\fR\fR -.ad -.sp .6 -.RS 4n -Force \fBAD_SUSPEND_TO_DISK\fR even when threads of user applications are -not suspendable. This subcommand should never be used, as it might result in -undefined behavior. -.RE - .RE .SH RETURN VALUES diff --git a/usr/src/lib/libbsm/common/adt.xml b/usr/src/lib/libbsm/common/adt.xml index 4884eb6ad2..a91f6c1782 100644 --- a/usr/src/lib/libbsm/common/adt.xml +++ b/usr/src/lib/libbsm/common/adt.xml @@ -2683,8 +2683,6 @@ Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. Interactive reboot Save the system state to the state file Check if system supports suspend to disk - Force suspend to disk even when threads of user - applications are not suspendable Save the system state to memory Check if system supports suspend to memory Single-user reboot -- 2.11.4.GIT