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

Diff of /trunk/src/runscript.c

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

Revision 2749 Revision 2750
1078 setenv ("RC_RUNSCRIPT_PID", pid, 1); 1078 setenv ("RC_RUNSCRIPT_PID", pid, 1);
1079 1079
1080 /* eprefix is kinda klunky, but it works for our purposes */ 1080 /* eprefix is kinda klunky, but it works for our purposes */
1081 if (rc_is_env ("RC_PREFIX", "yes")) { 1081 if (rc_is_env ("RC_PREFIX", "yes")) {
1082 int l = 0; 1082 int l = 0;
1083 int ll;
1083 char *svc; 1084 char *svc;
1084 1085
1085 /* Get the longest service name */ 1086 /* Get the longest service name */
1086 services = rc_services_in_runlevel (NULL); 1087 services = rc_services_in_runlevel (NULL);
1087 STRLIST_FOREACH (services, svc, i) { 1088 STRLIST_FOREACH (services, svc, i) {
1088 int ll = strlen (svc); 1089 ll = strlen (svc);
1089 if (ll > l) 1090 if (ll > l)
1090 l = ll; 1091 l = ll;
1091 } 1092 }
1092 // rc_strlist_free (services); 1093
1093 1094 /* Make our prefix string */
1094 svc = prefix = rc_xmalloc (sizeof (char *) * l); 1095 prefix = rc_xmalloc (sizeof (char *) * l);
1096 ll = strlen (applet);
1095 svc += strlcpy (prefix, applet, l); 1097 memcpy (prefix, applet, ll);
1096 i = l - strlen (prefix); 1098 memset (prefix + ll, ' ', l - ll);
1097 memset (svc, ' ', i);
1098 memset (svc + i, 0, 1); 1099 memset (prefix + l, 0, 1);
1099 eprefix (prefix); 1100 eprefix (prefix);
1100 } 1101 }
1101 1102
1102 /* If we're in parallel and we're not prefixing then we need the ebuffer */ 1103 /* If we're in parallel and we're not prefixing then we need the ebuffer */
1103 if (rc_is_env ("RC_PARALLEL", "yes") && ! rc_is_env ("RC_PREFIX", "yes")) { 1104 if (rc_is_env ("RC_PARALLEL", "yes") && ! rc_is_env ("RC_PREFIX", "yes")) {

Legend:
Removed from v.2749  
changed lines
  Added in v.2750

  ViewVC Help
Powered by ViewVC 1.1.20