Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

MINIX

Name: Anonymous 2011-01-22 13:55

That is all.

Name: Anonymous 2011-01-22 14:01

Yeah.
All the OS.

Name: Anonymous 2011-01-22 14:05

I prefer Linus' MINIX

Name: Anonymous 2011-01-22 14:07

If this is the MINIX what is the MAXIX?

Name: GENERA 2011-01-22 15:34

GODFUQINDAMN

Name: Anonymous 2011-01-22 15:45

tanenbaum sucks massive cocks

Name: Anonymous 2011-01-22 20:33

>>6
Well he can suck my massive monolithic cock any time.

Name: Anonymous 2011-01-24 9:09

From /src/boot/addaout.c


int copy_data(int srcfd, int dstfd)
{
 char buf[8192];
 ssize_t n;
 int total = 0;

 /* Copy the little bytes themselves. (Source from cp.c). */
 while ((n = read(srcfd, buf, sizeof(buf))) > 0)
 {
  char *bp = buf;
  ssize_t r;
  while (n > 0 && (r= write(dstfd, bp, n)) > 0)
  {
   bp += r;
   n -= r;
   total += r;
  }
  if (r <= 0)
  {
   if (r == 0)
   {
    fprintf(stderr, "Warning: EOF writing to output file.\n");
    return(-1);
   }
  }
 }
 return(total);
}


...


if (r <= 0)
{
 if (r == 0)
 {
  fprintf(stderr, "Warning: EOF writing to output file.\n");
  return(-1);
 }
}


ಠ_ಠ

Name: Anonymous 2011-01-24 9:14

>>8
ihbt

no way he got an OS running with stupid code like that

Name: Anonymous 2011-01-24 9:14

>>9

/* A small utility to append an a.out header to an arbitrary file. This allows
 * inclusion of arbitrary data in the boot image, so that it is magically
 * loaded as a RAM disk. The a.out header is structured as follows:
 *
 * a_flags: A_IMG to indicate this is not an executable
 *
 * Created: April 2005, Jorrit N. Herder
 */

Name: Anonymous 2011-01-24 9:24

>>8

Fixed in SVN


static int copy_data(int srcfd, int dstfd)
{
    char buf[8192];
    ssize_t n;
    int total=0;

    /** FIXME: handle error from read() */

    /* Copy the little bytes themselves. (Source from cp.c). */
    while ((n= read(srcfd, buf, sizeof(buf))) > 0) {
    char *bp = buf;
    ssize_t r = 0;

        /** FIXME: handle error from write() */
    while (n > 0 && (r= write(dstfd, bp, n)) > 0) {
        bp += r;
        n -= r;
        total += r;
    }
    if (r == 0) {
            fprintf(stderr, "Warning: EOF writing to output file.\n");
            return(-1);
    }
    }
    return(total);
}

Name: Anonymous 2011-01-24 9:25

>>10
I have to admit I once did something like that (for a homebrew OS) to force 32- and 64-bit binaries together, but at least I used objcopy to do it.

Name: Anonymous 2011-01-24 9:43

>>11
return(total);
return(

Name: Anonymous 2011-01-24 10:24

RETURN MY ANUS

Name: Anonymous 2011-01-24 19:33

# define ALLOC_BUF(_B, _S, _R) \
       do {                          \
      (_B) = (char*)malloc(_S);  \
      if ((_B) == NULL)          \
        return (_R);             \
       } while (0)

Name: Anonymous 2011-01-25 9:20

>>14
RETURN(MY ANUS)

FTFY, because I'm such kind person who don't hesitate to help faggots

Name: Anonymous 2011-02-03 8:16

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List