[Pkg-sysvinit-commits] r1573 - sysvinit/trunk/debian/startpar
Kel Modderman
kelmo-guest at alioth.debian.org
Sat Aug 1 12:23:53 UTC 2009
Author: kelmo-guest
Date: 2009-08-01 12:23:52 +0000 (Sat, 01 Aug 2009)
New Revision: 1573
Modified:
sysvinit/trunk/debian/startpar/Makefile
sysvinit/trunk/debian/startpar/makeboot.c
sysvinit/trunk/debian/startpar/startpar.c
Log:
Deapply all of our patches to startpar souce tree. The quilt series will be applied by debian/rules patch target later.
Modified: sysvinit/trunk/debian/startpar/Makefile
===================================================================
--- sysvinit/trunk/debian/startpar/Makefile 2009-07-30 16:34:53 UTC (rev 1572)
+++ sysvinit/trunk/debian/startpar/Makefile 2009-08-01 12:23:52 UTC (rev 1573)
@@ -1,5 +1,5 @@
VERSION = 0.53.1
-ISSUSE = -DNOTSUSE
+ISSUSE = -DSUSE
INSTALL = install -m 755
INSTALL_DATA = install -m 644
Modified: sysvinit/trunk/debian/startpar/makeboot.c
===================================================================
--- sysvinit/trunk/debian/startpar/makeboot.c 2009-07-30 16:34:53 UTC (rev 1572)
+++ sysvinit/trunk/debian/startpar/makeboot.c 2009-08-01 12:23:52 UTC (rev 1573)
@@ -17,12 +17,6 @@
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
-#ifndef POSIX_FADV_SEQUENTIAL
-#define posix_fadvise(fd, off, len, adv) (-1)
-#endif
-#ifndef O_DIRECT
-#define O_DIRECT 0
-#endif
static int o_flags = O_RDONLY;
#endif
@@ -117,11 +111,8 @@
fprintf(stderr, "loop exists %s in %s!\n", dep->name, src->name);
return 1;
}
- if (loop++ > 99999) {
- fprintf(stderr, "too many loops! (loop=%d, dep->name=%s, src->name=%s)\n",
- loop, dep->name, src->name);
+ if (loop++ > 999)
return 1;
- }
if (check_loop(s->node, src))
return 1;
}
Modified: sysvinit/trunk/debian/startpar/startpar.c
===================================================================
--- sysvinit/trunk/debian/startpar/startpar.c 2009-07-30 16:34:53 UTC (rev 1572)
+++ sysvinit/trunk/debian/startpar/startpar.c 2009-08-01 12:23:52 UTC (rev 1573)
@@ -33,9 +33,6 @@
#include <sys/un.h>
#include <sys/sysinfo.h>
#include <sys/stat.h>
-#ifndef SUSE
-#include <sys/vfs.h>
-#endif
#include <time.h>
#include <fcntl.h>
#include <errno.h>
@@ -298,70 +295,6 @@
#define SOCK_PATH "/dev/shm/preload_sock"
-#ifdef SUSE
-static int checkdevpts(void)
-{
- /* /dev/pts is always mounted */
- return 1;
-}
-#else
-/*
- * Based on __posix_openpt() from glibc. Reimplemented here to work
- * around the problem with getpt() failing for the entire process life
- * time if /dev/pts/ is missing the first time it is called but
- * mounted while the process is running. BSD style pts is not
- * supported, but might be copied from glibc too if there is need.
- */
-#define DEVFS_SUPER_MAGIC 0x1373
-#define DEVPTS_SUPER_MAGIC 0x1cd1
-
-static int startpar_getpt(void) {
- int fd = open("/dev/ptmx", O_RDWR|O_NOCTTY);
-
- if (fd != -1)
- {
- struct statfs fsbuf;
-
- /* Check that the /dev/pts filesystem is mounted
- or if /dev is a devfs filesystem (this implies /dev/pts). */
- if ((statfs ("/dev/pts", &fsbuf) == 0
- && fsbuf.f_type == DEVPTS_SUPER_MAGIC)
- || (statfs ("/dev", &fsbuf) == 0
- && fsbuf.f_type == DEVFS_SUPER_MAGIC))
- {
- /* Everything is ok, switch to the getpt() in libc. */
- return fd;
- }
-
- /* If /dev/pts is not mounted then the UNIX98 pseudo terminals
- are not usable. */
- close (fd);
- }
-
- return -1;
-}
-
-static int checkdevpts(void)
-{
- int ptsfd = startpar_getpt();
-
- if (ptsfd == -1)
- {
- return 0;
- }
- else if (ptsname(ptsfd) == 0 || grantpt(ptsfd) || unlockpt(ptsfd))
- {
- close(ptsfd);
- return 0;
- }
- else
- {
- close(ptsfd);
- return 1;
- }
-}
-#endif
-
void run(struct prg *p)
{
char *m = 0;
@@ -920,7 +853,6 @@
pid_t pid = 0;
int r = 0, s;
long diff;
- int devpts = 0;
gettimeofday(&now, 0);
FD_ZERO(&rset);
@@ -942,8 +874,6 @@
for (s = 0; s < par; s++) /* never leave this with break!! */
{
account: /* for the new process below */
- if (!devpts)
- devpts = checkdevpts();
p = prgs + s;
if (p == interactive_task)
continue; /* don't count this here */
@@ -976,11 +906,6 @@
p->num = num++;
if (interactive_task)
continue; /* don't start this here */
- if (!devpts)
- {
- interactive_task = p; /* no /dev/pts, treat as interactive */
- continue;
- }
run(p);
if (p->pid == 0)
{
More information about the Pkg-sysvinit-commits
mailing list