Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: System freeze - scanning recordings ...



Am Montag, 22. September 2003 20:22 schrieben Sie:

May be off-topic, but interesting in failure search: 

#include "stdlib.h"
#include <stdio.h>


#define FINDCMD      "/usr/bin/find %s -follow -type d -name '%s' 2> 
/dev/null;echo"

int main(){

      char *cmd = NULL;
      asprintf(&cmd, FINDCMD, "/video", "*.rec");
      FILE *p = popen(cmd, "r");

      char *s;
      while ((s = readline(p)) != NULL) {
         sprintf(stderr, "%s", *s);
      }
      pclose(p);


//      system(cmd);
      return 0;
}

exits with the following errors. I have no real clue what to change. My 
intention is to test the popen function on my system.

coruscant root # gcc -I /usr/include/ bla.c
bla.c: In function `main':
bla.c:14: warning: assignment makes pointer from integer without a cast
bla.c:15: warning: passing arg 1 of `sprintf' from incompatible pointer type
/tmp/ccmA7UXM.o(.text+0x57): In function `main':
: undefined reference to `readline'
collect2: ld returned 1 exit status


-- 
Thorsten 



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index