changeset 13662:f850d57a9b6e

865 old mcs swap debugging code should be removed Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Andrew Stormont <Andrew.Stormont@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Alek Pinchuk <alek@nexenta.com>
date Fri, 06 Apr 2012 18:41:42 -0500
parents 34a2ada0dd49
children a64c8d17c8f4
files usr/src/cmd/sgs/mcs/common/main.c
diffstat 1 files changed, 5 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/sgs/mcs/common/main.c	Thu Apr 05 16:16:24 2012 +0200
+++ b/usr/src/cmd/sgs/mcs/common/main.c	Fri Apr 06 18:41:42 2012 -0500
@@ -20,6 +20,8 @@
  */
 
 /*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
+ *
  *	Copyright (c) 1988 AT&T
  *	  All Rights Reserved
  *
@@ -43,7 +45,6 @@
 static void usage(int);
 static void sigexit(int);
 static int setup_sectname(char *, int);
-static void check_swap();
 static void queue(int, char *);
 
 int
@@ -51,7 +52,7 @@
 {
 	const char	*opt;
 	char		*str;
-	int		error_count = 0, num_sect = 0, errflag = 0, Dflag = 0;
+	int		error_count = 0, num_sect = 0, errflag = 0;
 	int		c, i, my_prog;
 	Cmd_Info	*cmd_info;
 
@@ -72,10 +73,10 @@
 
 	if (strcmp(str, "mcs") == 0) {
 		my_prog = MCS;
-		opt = "Da:cdn:pVz?";
+		opt = "a:cdn:pVz?";
 	} else if (strcmp(str, "strip") == 0) {
 		my_prog = STRIP;
-		opt = "DlxV?";
+		opt = "lxV?";
 	} else
 		exit(FAILURE);
 
@@ -108,10 +109,6 @@
 
 	while ((c = getopt(argc, argv, (char *)opt)) != EOF) {
 		switch (c) {
-		case 'D':
-			optcnt++;
-			Dflag++;
-			break;
 		case 'a':
 			optcnt++;
 			queue(ACT_APPEND, optarg);
@@ -169,9 +166,6 @@
 		exit(FAILURE);
 	}
 
-	if (Dflag)
-		check_swap();
-
 	/*
 	 * strip command may not take any options.
 	 */
@@ -235,8 +229,6 @@
 		}
 	}
 
-	if (Dflag)
-		check_swap();
 	mcs_exit(error_count);
 	/*NOTREACHED*/
 	return (0);
@@ -372,9 +364,3 @@
 	}
 	return (1);
 }
-
-static void
-check_swap()
-{
-	(void) system("/usr/sbin/swap -s");
-}