cmdgen_umountall.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "cmdgen_include.h"
/*
* Public data type declaration
*/
#define UMNTALL_CMD "/usr/sbin/umountall"
#define FSTYPE_FLAG "-F"
#define HOST_FLAG "-h"
#define KILL_FLAG "-k"
#define LOCAL_FLAG "-l"
#define NO_PARALLEL_FLAG "-s"
#define REMOTE_FLAG "-r"
#define SPACE " "
/*
* Public methods
*/
/*
* Method: cmdgen_umountall
*
* Description: Forms the umountall command with the options given.
*
* Parameters:
* - CCIMPropertyList *paramList - The parameter list containing the
* options for the umountall command.
* - int *errp - The error indicator. Upon error, this will get set to a
* value != 0.
*
* Returns:
* - char * - The formed umounall command.
* - NULL if an error occurred.
*/
char *
int cmdLen;
return (NULL);
}
/*
* In parameters in the paramList are as follows:
* 1. String fstype,
* 2. String host,
* 3. Boolean onlyLocalFileSystems,
* 4. Boolean onlyRemoteFileSystems,
* 5. Boolean killProcesses,
* 6. Boolean umountInParallel
*
* They are expected to always be in this order in the property list.
*/
/*
* Check if a file system type was passed in. If one was we will
* use this in forming the command.
*/
/*
* Add -F <fstype> to the command
*/
return (NULL);
}
}
/*
* Check if a host was passed in.
*/
/*
* Add -h <host> to the command.
*/
return (NULL);
}
}
cim_logDebug("cmdgen_umountall",
"Adding the -l flag");
/*
* Add the -l flag to the command.
*/
return (NULL);
}
}
}
/*
* Add the -r flag to the command.
*/
cim_logDebug("cmdgen_umountall",
"Adding the -r flag");
return (NULL);
}
}
}
/*
* Add the -k flag to the command.
*/
cim_logDebug("cmdgen_umountall",
"Adding the -k flag");
return (NULL);
}
}
}
/*
* Add the -s flag (do not perform umount operation in
* parallel) to the command.
*/
cim_logDebug("cmdgen_umountall",
"Adding the -s flag");
return (NULL);
}
}
}
/*
* The caller must free the memory allocated to the return value
* using free().
*/
*errp = 0;
return (cmd);
} /* cmdgen_umountall */