|
|
1.1 ! root 1: /* ! 2: * File: idenable_dev.c ! 3: * ! 4: * Purpose: Write a line "variable_name" "value" to the right file ! 5: * ! 6: * Revised: Fri Jul 30 11:38:24 1993 CDT ! 7: */ ! 8: ! 9: /* ! 10: * ---------------------------------------------------------------------- ! 11: * Includes. ! 12: */ ! 13: #include <stdio.h> ! 14: #include "build0.h" ! 15: ! 16: /* ! 17: * ---------------------------------------------------------------------- ! 18: * Definitions. ! 19: * Constants. ! 20: * Macros with argument lists. ! 21: * Typedefs. ! 22: * Enums. ! 23: */ ! 24: ! 25: /* ! 26: * ---------------------------------------------------------------------- ! 27: * Functions. ! 28: * Import Functions. ! 29: * Export Functions. ! 30: * Local Functions. ! 31: */ ! 32: void idenable_dev __PROTO((char * devName)); ! 33: ! 34: /* ! 35: * ---------------------------------------------------------------------- ! 36: * Global Data. ! 37: * Import Variables. ! 38: * Export Variables. ! 39: * Local Variables. ! 40: */ ! 41: ! 42: /* ! 43: * ---------------------------------------------------------------------- ! 44: * Code. ! 45: */ ! 46: ! 47: /************************************************************************ ! 48: * idenable_dev ! 49: * ! 50: ***********************************************************************/ ! 51: #if __USE_PROTO__ ! 52: void idenable_dev (char * devName) ! 53: #else ! 54: void ! 55: idenable_dev (devName) ! 56: char * devName; ! 57: #endif ! 58: { ! 59: FILE * fp; ! 60: ! 61: if ((fp = fopen(IDCMDFILE, "a")) == NULL) { ! 62: fprintf(stderr, "Can't append to %s\n", IDCMDFILE); ! 63: exit(1); ! 64: } ! 65: ! 66: fprintf(fp, "/etc/conf/bin/idenable -f %s\n", devName); ! 67: ! 68: fclose(fp); ! 69: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.