/[baselayout]/trunk/src/librc.c
Gentoo

Diff of /trunk/src/librc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2549 Revision 2552
84 FILE *fp; 84 FILE *fp;
85 static char buffer [PATH_MAX]; 85 static char buffer [PATH_MAX];
86 86
87 if (! (fp = fopen (SOFTLEVEL, "r"))) 87 if (! (fp = fopen (SOFTLEVEL, "r")))
88 { 88 {
89 strcpy (buffer, "sysinit"); 89 snprintf (buffer, sizeof (buffer), "sysinit");
90 return (buffer); 90 return (buffer);
91 } 91 }
92 92
93 if (fgets (buffer, PATH_MAX, fp)) 93 if (fgets (buffer, PATH_MAX, fp))
94 { 94 {
98 fclose (fp); 98 fclose (fp);
99 return (buffer); 99 return (buffer);
100 } 100 }
101 101
102 fclose (fp); 102 fclose (fp);
103 strcpy (buffer, "sysinit"); 103 snprintf (buffer, sizeof (buffer), "sysinit");
104 return (buffer); 104 return (buffer);
105} 105}
106 106
107void rc_set_runlevel (const char *runlevel) 107void rc_set_runlevel (const char *runlevel)
108{ 108{

Legend:
Removed from v.2549  
changed lines
  Added in v.2552

  ViewVC Help
Powered by ViewVC 1.1.20