[comp.os.minix] HD, and patch patch

allbery@ncoast.UUCP (Brandon S. Allbery) (05/24/87)

Two things:

(1) My HD:  I don't know if there's light or not, but writes fail past
cylinder 305.  This is suspiciously familiar; I'm beginning to think that
the wini.c is passing write parameters that tell my controller that I have a
10MB disk???  (Reads of the entire disk work fine.)

(2) The recent mods to patch for Minix include a so-called system() routine.
I have a simpler one that works as the Un*x one does below.

------- system.c -------

#define SHELL		"/bin/sh"

system(c)
char *c; {
	int pid, exstat;
	
	switch (pid = fork()) {
	case -1:
		return -1;
	case 0:
		execl(SHELL, "sh", "-c", c, (char *) 0);
		exit(-1);
	default:
		while (wait(&status) != pid)
			;
	}
	return status;
}

I did note in /usr/src/cmd/sh/sh1.c (my hd, at least [as much as it works])
that sh -c is supported, as a flag at least.

++Brando
-- 
Copyright (C) 1987 Brandon S. Allbery.  Redistribution permitted only if the
	redistributor permits further redistribution.
		 ---- Moderator for comp.sources.misc ----
Brandon S. Allbery	{decvax,cbatt,cbosgd}!cwruecmp!ncoast!allbery
Tridelta Industries	{ames,mit-eddie,talcott}!necntc!ncoast!allbery
7350 Corporate Blvd.	necntc!ncoast!allbery@harvard.HARVARD.EDU
Mentor, OH 44060	+01 216 255 1080	(also eddie.MIT.EDU)