File:  [MW Coherent from dump] / coherent / f / tmp / inst2 / idenable_dev.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:40 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * File:	idenable_dev.c
 *
 * Purpose:	Write a line "variable_name"  "value" to the right file
 *
 * Revised: Fri Jul 30 11:38:24 1993 CDT
 */

/*
 * ----------------------------------------------------------------------
 * Includes.
 */
#include <stdio.h>
#include "build0.h"

/*
 * ----------------------------------------------------------------------
 * Definitions.
 *	Constants.
 *	Macros with argument lists.
 *	Typedefs.
 *	Enums.
 */

/*
 * ----------------------------------------------------------------------
 * Functions.
 *	Import Functions.
 *	Export Functions.
 *	Local Functions.
 */
void idenable_dev __PROTO((char * devName));

/*
 * ----------------------------------------------------------------------
 * Global Data.
 *	Import Variables.
 *	Export Variables.
 *	Local Variables.
 */

/*
 * ----------------------------------------------------------------------
 * Code.
 */

/************************************************************************
 * idenable_dev
 *
 ***********************************************************************/
#if __USE_PROTO__
void idenable_dev (char * devName)
#else
void
idenable_dev (devName)
char * devName;
#endif
{
	FILE * fp;

	if ((fp = fopen(IDCMDFILE, "a")) == NULL) {
		fprintf(stderr, "Can't append to %s\n", IDCMDFILE);
		exit(1);
	}

	fprintf(fp, "/etc/conf/bin/idenable -f %s\n", devName);

	fclose(fp);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.